#include #include using namespace std; int c, d; double ans; int main() { // freopen("pharmacy.in", "r", stdin); // freopen("pharmacy.out", "w", stdout); scanf("%d%d", &c, &d); // 只A ans = max(ans, 1000 * min(1.0 * c / (3.0 / 4), 1.0 * d / (1.0 / 4))); // 只B ans = max(ans, 2000 * min(1.0 * c / (2.0 / 7), 1.0 * d / (5.0 / 7))); // AB都有 double x = (0.0 + 20 * c - 8 * d) / 13; double y = (0.0 + 21 * d - 7 * c) / 13; if (x >= 0.0 && y >= 0.0) { ans = max(ans, 1000 * x + 2000 * y); } printf("%.10lf\n", ans); return 0; }