import java.io.*; import java.util.*; public class Main_yukicoder453 { private static Scanner sc; private static Printer pr; private static void solve() { int c = sc.nextInt(); int d = sc.nextInt(); double max = 0; for (int i = 0; i < 1_000_000 / 2; i++) { double x = (double)c * i / 1_000_000 * 2; double l = 0; double r = d; for (int j = 0; j < 40; j++) { double c1 = (l + l + r) / 3; double c2 = (l + r + r) / 3; if (f(c1, x, c, d) < f(c2, x, c, d)) { l = c1; } else { r = c2; } } max = Math.max(max, f(r, x, c, d)); } // pr.printf("%.7f\n", ret); pr.println(max); } private static double f(double y, double x, int c, int d) { double ret = Math.min(x * 4 / 3, y * 4) * 1000 + Math.min((c - x) * 7 / 2, (d - y) * 7 / 5) * 2000; return ret; } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }