#include <iostream>
#include <iomanip>

int main() {
    int x, y;
    // 输入雪糕和碎碎冰的购买数量
    std::cin >> x >> y;

    // 计算实际需要付钱的雪糕数量
    int paidIceCream = (x > 1)? x - 1 : 0;

    // 计算应付金额
    double total = paidIceCream * 2.5 + y * 1.5;

    // 输出结果,保留一位小数
    std::cout << std::fixed << std::setprecision(1) << total << std::endl;

    return 0;
}    
/**************************************************************
	Problem: 1603
	User: fuyijun
	Language: C++
	Result: Accepted
	Time:11 ms
	Memory:2072 kb
****************************************************************/