import java.util.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double a1 =0.08;
		double b1 =0.1;
		double s=0;
		int ans =-1;
		int s1 =0;
		double t =0;
		double t1 =0;
		for(int i=1; i<10000;i++) {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		}
		System.out.print(ans);

	}
} import java.util.*; util.* java import java.math.BigDecimal; BigDecimal java.math import java.math.RoundingMode; RoundingMode java.math public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double a1 =0.08;
		double b1 =0.1;
		double s=0;
		int ans =-1;
		int s1 =0;
		double t =0;
		double t1 =0;
		for(int i=1; i<10000;i++) {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		}
		System.out.print(ans);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double a1 =0.08;
		double b1 =0.1;
		double s=0;
		int ans =-1;
		int s1 =0;
		double t =0;
		double t1 =0;
		for(int i=1; i<10000;i++) {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		}
		System.out.print(ans);

	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double a1 =0.08;
		double b1 =0.1;
		double s=0;
		int ans =-1;
		int s1 =0;
		double t =0;
		double t1 =0;
		for(int i=1; i<10000;i++) {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		}
		System.out.print(ans);

	} 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 double a1 =0.08; a1 0.08 double b1 =0.1; b1 0.1 double s=0; s 0 int ans =-1; ans -1 1 int s1 =0; s1 0 double t =0; t 0 double t1 =0; t1 0 for(int i=1; i<10000;i++) {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		} int i=1; int i=1; i 1 i<10000 i 10000 i++ i++ i {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		} {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		} s=i*0.08 s i*0.08 i 0.08 s1 =(int)s s1 (int)s t=i*0.1 t i*0.1 i 0.1 t1 =(int)t t1 (int)t if(s1==A &&t1==B) {
				ans = i;
				break;
			} s1==A &&t1==B s1==A s1 A t1==B t1 B {
				ans = i;
				break;
			} ans = i ans i break; System.out.print(ans) System.out.print System.out System System.out ans 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();
		double a1 =0.08;
		double b1 =0.1;
		double s=0;
		int ans =-1;
		int s1 =0;
		double t =0;
		double t1 =0;
		for(int i=1; i<10000;i++) {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		}
		System.out.print(ans);

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double a1 =0.08;
		double b1 =0.1;
		double s=0;
		int ans =-1;
		int s1 =0;
		double t =0;
		double t1 =0;
		for(int i=1; i<10000;i++) {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		}
		System.out.print(ans);

	}
} Main
import java.util.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		double a1 =0.08;
		double b1 =0.1;
		double s=0;
		int ans =-1;
		int s1 =0;
		double t =0;
		double t1 =0;
		for(int i=1; i<10000;i++) {
			s=i*0.08;
			s1 =(int)s;
			t=i*0.1;
			t1 =(int)t;
			if(s1==A &&t1==B) {
				ans = i;
				break;
			}
			
			
			
			
			
		}
		System.out.print(ans);

	}
}
