//package javaapplication2;
import java.util.*;
import java.io.*;
import static java.lang.System.out;

public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        int A = Integer.parseInt(s[0]);
        int B = Integer.parseInt(s[1]);
        System.out.println(solve(A,B));
    }
    
    private static int solve(int A,int B){
        int low = 1,high = Integer.MAX_VALUE;
        int ans = -1;
        while(low <= high){
            int mid = low + (high - low) / 2;
            int p8 = consumptionRate(mid,8);
            int p10 = consumptionRate(mid,10);
            if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1;
        }
        return ans;
    }
    
    private static int consumptionRate(long p,int percent){
        return (int)Math.floor(p * percent / 100.0);
    }
} import java.util.*; util.* java import java.io.*; io.* java import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        int A = Integer.parseInt(s[0]);
        int B = Integer.parseInt(s[1]);
        System.out.println(solve(A,B));
    }
    
    private static int solve(int A,int B){
        int low = 1,high = Integer.MAX_VALUE;
        int ans = -1;
        while(low <= high){
            int mid = low + (high - low) / 2;
            int p8 = consumptionRate(mid,8);
            int p10 = consumptionRate(mid,10);
            if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1;
        }
        return ans;
    }
    
    private static int consumptionRate(long p,int percent){
        return (int)Math.floor(p * percent / 100.0);
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        int A = Integer.parseInt(s[0]);
        int B = Integer.parseInt(s[1]);
        System.out.println(solve(A,B));
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        int A = Integer.parseInt(s[0]);
        int B = Integer.parseInt(s[1]);
        System.out.println(solve(A,B));
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] s = br.readLine().split("\\s"); s br.readLine().split("\\s") br.readLine().split br.readLine() br.readLine br "\\s" int A = Integer.parseInt(s[0]); A Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int B = Integer.parseInt(s[1]); B Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 System.out.println(solve(A,B)) System.out.println System.out System System.out solve(A,B) solve A B String[] args args private static int solve(int A,int B){
        int low = 1,high = Integer.MAX_VALUE;
        int ans = -1;
        while(low <= high){
            int mid = low + (high - low) / 2;
            int p8 = consumptionRate(mid,8);
            int p10 = consumptionRate(mid,10);
            if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1;
        }
        return ans;
    } solve {
        int low = 1,high = Integer.MAX_VALUE;
        int ans = -1;
        while(low <= high){
            int mid = low + (high - low) / 2;
            int p8 = consumptionRate(mid,8);
            int p10 = consumptionRate(mid,10);
            if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1;
        }
        return ans;
    } int low = 1 low 1 high = Integer.MAX_VALUE; high Integer.MAX_VALUE Integer Integer.MAX_VALUE int ans = -1; ans -1 1 while(low <= high){
            int mid = low + (high - low) / 2;
            int p8 = consumptionRate(mid,8);
            int p10 = consumptionRate(mid,10);
            if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1;
        } low <= high low high {
            int mid = low + (high - low) / 2;
            int p8 = consumptionRate(mid,8);
            int p10 = consumptionRate(mid,10);
            if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1;
        } int mid = low + (high - low) / 2; mid low + (high - low) / 2 low (high - low) / 2 (high - low) high low 2 int p8 = consumptionRate(mid,8); p8 consumptionRate(mid,8) consumptionRate mid 8 int p10 = consumptionRate(mid,10); p10 consumptionRate(mid,10) consumptionRate mid 10 if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1; p8 == A && p10 == B p8 == A p8 A p10 == B p10 B {
                ans = mid;
                high = mid - 1;
            } ans = mid ans mid high = mid - 1 high mid - 1 mid 1 if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1; p8 <= A && p10 <= B p8 <= A p8 A p10 <= B p10 B low = mid + 1 low mid + 1 mid 1 high = mid - 1 high mid - 1 mid 1 return ans; ans int A A int B B private static int consumptionRate(long p,int percent){
        return (int)Math.floor(p * percent / 100.0);
    } consumptionRate {
        return (int)Math.floor(p * percent / 100.0);
    } return (int)Math.floor(p * percent / 100.0); (int)Math.floor(p * percent / 100.0) Math.floor Math p * percent / 100.0 p * percent p percent 100.0 long p p int percent percent public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        int A = Integer.parseInt(s[0]);
        int B = Integer.parseInt(s[1]);
        System.out.println(solve(A,B));
    }
    
    private static int solve(int A,int B){
        int low = 1,high = Integer.MAX_VALUE;
        int ans = -1;
        while(low <= high){
            int mid = low + (high - low) / 2;
            int p8 = consumptionRate(mid,8);
            int p10 = consumptionRate(mid,10);
            if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1;
        }
        return ans;
    }
    
    private static int consumptionRate(long p,int percent){
        return (int)Math.floor(p * percent / 100.0);
    }
} public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        int A = Integer.parseInt(s[0]);
        int B = Integer.parseInt(s[1]);
        System.out.println(solve(A,B));
    }
    
    private static int solve(int A,int B){
        int low = 1,high = Integer.MAX_VALUE;
        int ans = -1;
        while(low <= high){
            int mid = low + (high - low) / 2;
            int p8 = consumptionRate(mid,8);
            int p10 = consumptionRate(mid,10);
            if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1;
        }
        return ans;
    }
    
    private static int consumptionRate(long p,int percent){
        return (int)Math.floor(p * percent / 100.0);
    }
} Main
//package javaapplication2;
import java.util.*;
import java.io.*;
import static java.lang.System.out;

public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split("\\s");
        int A = Integer.parseInt(s[0]);
        int B = Integer.parseInt(s[1]);
        System.out.println(solve(A,B));
    }
    
    private static int solve(int A,int B){
        int low = 1,high = Integer.MAX_VALUE;
        int ans = -1;
        while(low <= high){
            int mid = low + (high - low) / 2;
            int p8 = consumptionRate(mid,8);
            int p10 = consumptionRate(mid,10);
            if(p8 == A && p10 == B){
                ans = mid;
                high = mid - 1;
            }else if(p8 <= A && p10 <= B) low = mid + 1;
            else high = mid - 1;
        }
        return ans;
    }
    
    private static int consumptionRate(long p,int percent){
        return (int)Math.floor(p * percent / 100.0);
    }
}
