import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.*; import java.math.BigInteger; public class Main implements Runnable { static int mod = 1000000007; public static void main(String[] args) { new Thread(null, new Main(), "", 1024 * 1024 * 1024).start(); } public void run() { PrintWriter out = new PrintWriter(System.out); FastScanner sc = new FastScanner(); double c = sc.nextDouble(); double d = sc.nextDouble(); double[][] A = {{0.75,2/(double)7},{0.25,5/(double)7}}; double[] b = {c,d}; double[] z = {-1000,-2000}; OnePhaseSimplex ops = new OnePhaseSimplex(A,b,z); ops.solve(); out.println(-ops.min()); out.flush(); } } class OnePhaseSimplex { double[][] t; //シンプレックス・タブロー double[] con; //シンプレックス・タブローのi行目の定数項 int[] basis; //タブローのi行目の基底変数 int N; //A,cの変数の数 int M; //制約式の数 double eps = 0.000001; //許容誤差ε //変数のindex: //0-N-1 x0 - xN-1 //N - N+M-1 s0 - sM-1 スラック変数 //N+M z(陽に持たない) //タブロー //0-M-1行目 制約式 //M行目 zの式 //Ax<=b(bの要素が全て正)のもとでz=cxを最小化 public OnePhaseSimplex(double[][] A, double[] b, double[] c){ this.N = A[0].length; this.M = A.length; this.t = new double[M+1][N+M]; this.con = new double[M+1]; basis = new int[M+1]; for(int i=0;i0){ double candidate = con[i]/t[i][id]; if(candidate < min){ min = candidate; minid = i; } } } if(minid == -2){ //非有界 return stat.UNBOUNDED; } double divisor = t[minid][id]; for(int i=0;i Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public int[] nextintArray(int n){ int[] a = new int[n]; for(int i=0;i