import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b,x,ans;
		
		a=sc.nextInt();
		b=sc.nextInt();

		ans=-1;
		for (x=10*b+9; x>=10*b;x--){
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		}

		System.out.println(ans);
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b,x,ans;
		
		a=sc.nextInt();
		b=sc.nextInt();

		ans=-1;
		for (x=10*b+9; x>=10*b;x--){
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		}

		System.out.println(ans);
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b,x,ans;
		
		a=sc.nextInt();
		b=sc.nextInt();

		ans=-1;
		for (x=10*b+9; x>=10*b;x--){
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		}

		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int a,b,x,ans;
		
		a=sc.nextInt();
		b=sc.nextInt();

		ans=-1;
		for (x=10*b+9; x>=10*b;x--){
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		}

		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a a b b x x ans; ans a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc ans=-1 ans -1 1 for (x=10*b+9; x>=10*b;x--){
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		} x=10*b+9; x=10*b+9 x 10*b+9 10*b 10 b 9 x>=10*b x 10*b 10 b x-- x-- x {
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		} {
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		} if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			} 25*a <= 2*x && 2*x < 25*a+25 25*a <= 2*x 25*a 25 a 2*x 2 x 2*x < 25*a+25 2*x 2 x 25*a+25 25*a 25 a 25 {
				ans=x;
			} ans=x ans x System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b,x,ans;
		
		a=sc.nextInt();
		b=sc.nextInt();

		ans=-1;
		for (x=10*b+9; x>=10*b;x--){
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		}

		System.out.println(ans);
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b,x,ans;
		
		a=sc.nextInt();
		b=sc.nextInt();

		ans=-1;
		for (x=10*b+9; x>=10*b;x--){
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		}

		System.out.println(ans);
		sc.close();
	}
} Main
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a,b,x,ans;
		
		a=sc.nextInt();
		b=sc.nextInt();

		ans=-1;
		for (x=10*b+9; x>=10*b;x--){
			if(25*a <= 2*x && 2*x < 25*a+25){
				ans=x;
			}
		}

		System.out.println(ans);
		sc.close();
	}
}