import java.util.*;

public class Main {
	

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        int a1 = a + 1;
        int b1 = b + 1;
        int res = -1;
        for(int i = 0; i<=1262; i++) {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        }
        
       
        
        
        
        
        
        
        
        System.out.print(res);
        
	}
} import java.util.*; util.* java public class Main {
	

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        int a1 = a + 1;
        int b1 = b + 1;
        int res = -1;
        for(int i = 0; i<=1262; i++) {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        }
        
       
        
        
        
        
        
        
        
        System.out.print(res);
        
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        int a1 = a + 1;
        int b1 = b + 1;
        int res = -1;
        for(int i = 0; i<=1262; i++) {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        }
        
       
        
        
        
        
        
        
        
        System.out.print(res);
        
	} main {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        int a1 = a + 1;
        int b1 = b + 1;
        int res = -1;
        for(int i = 0; i<=1262; i++) {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        }
        
       
        
        
        
        
        
        
        
        System.out.print(res);
        
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int a1 = a + 1; a1 a + 1 a 1 int b1 = b + 1; b1 b + 1 b 1 int res = -1; res -1 1 for(int i = 0; i<=1262; i++) {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        } int i = 0; int i = 0; i 0 i<=1262 i 1262 i++ i++ i {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        } {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        } if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	} i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1 i*0.1>=b i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1 i*0.08>=a i*0.08 i 0.08 a (a+1)>i*0.08 (a+1) a 1 i*0.08 i 0.08 i*0.1>=b i*0.1 i 0.1 b (b+1)>i*0.1 (b+1) b 1 i*0.1 i 0.1 {
        		res = i;
        		break;
        	} res = i res i break; System.out.print(res) System.out.print System.out System System.out res String[] args args public class Main {
	

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        int a1 = a + 1;
        int b1 = b + 1;
        int res = -1;
        for(int i = 0; i<=1262; i++) {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        }
        
       
        
        
        
        
        
        
        
        System.out.print(res);
        
	}
} public class Main {
	

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        int a1 = a + 1;
        int b1 = b + 1;
        int res = -1;
        for(int i = 0; i<=1262; i++) {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        }
        
       
        
        
        
        
        
        
        
        System.out.print(res);
        
	}
} Main
import java.util.*;

public class Main {
	

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        
        int a1 = a + 1;
        int b1 = b + 1;
        int res = -1;
        for(int i = 0; i<=1262; i++) {
        	if(i*0.08>=a && (a+1)>i*0.08 && i*0.1>=b && (b+1)>i*0.1) {
        		res = i;
        		break;
        	}
        }
        
       
        
        
        
        
        
        
        
        System.out.print(res);
        
	}
}