import java.util.*;
public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Random rand = new Random();
        
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for(int i = 10000; i > 0; i--){
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        }
        System.out.println(ans);

    
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Random rand = new Random();
        
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for(int i = 10000; i > 0; i--){
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        }
        System.out.println(ans);

    
	}
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Random rand = new Random();
        
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for(int i = 10000; i > 0; i--){
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        }
        System.out.println(ans);

    
	} main {
        Scanner sc = new Scanner(System.in);
        Random rand = new Random();
        
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for(int i = 10000; i > 0; i--){
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        }
        System.out.println(ans);

    
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Random rand = new Random(); rand new Random() int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int ans = -1; ans -1 1 for(int i = 10000; i > 0; i--){
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        } int i = 10000; int i = 10000; i 10000 i > 0 i 0 i-- i-- i {
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        } {
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        } int tax1 = (int)(i* 0.08); tax1 (int)(i* 0.08) i 0.08 int tax2 = (int)(i* 0.1); tax2 (int)(i* 0.1) i 0.1 if(tax1==a && tax2==b){
                ans = i;
            } tax1==a && tax2==b tax1==a tax1 a tax2==b tax2 b {
                ans = i;
            } ans = i ans i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Random rand = new Random();
        
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for(int i = 10000; i > 0; i--){
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        }
        System.out.println(ans);

    
	}
} public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Random rand = new Random();
        
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for(int i = 10000; i > 0; i--){
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        }
        System.out.println(ans);

    
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Random rand = new Random();
        
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = -1;
        for(int i = 10000; i > 0; i--){
            int tax1 = (int)(i* 0.08);
            int tax2 = (int)(i* 0.1);
            if(tax1==a && tax2==b){
                ans = i;
            }
        }
        System.out.println(ans);

    
	}
}