#include #include #include #include #include #include #include #include #include #include #include static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template constexpr T INF = ::numeric_limits::max() / 32 * 15 + 208; int main() { double c, d; cin >> c >> d; double ans = max(min(c*4/3, d*4)*1000, min(c*7/2, d*7/5)*2000); if(d*2/5 <= c && c <= d*3){ ans = max(ans, (5*c-2*d)*4/13*1000+(3*d-c)*7/13*2000); } printf("%.10lf", ans); return 0; }