import java.util.Scanner;


public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = -1;
		for(int i = 0; i < 20000; i++) {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = -1;
		for(int i = 0; i < 20000; i++) {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
} Main public static long ans = 0; ans 0 public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = -1;
		for(int i = 0; i < 20000; i++) {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	} main {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = -1;
		for(int i = 0; i < 20000; i++) {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) boolean f = false; f false long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc ans = -1 ans -1 1 for(int i = 0; i < 20000; i++) {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		} int i = 0; int i = 0; i 0 i < 20000 i 20000 i++ i++ i {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		} {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		} double tmpa = Math.floor(i * 0.08); tmpa Math.floor(i * 0.08) Math.floor Math i * 0.08 i 0.08 double tmpb = Math.floor(i * 0.1); tmpb Math.floor(i * 0.1) Math.floor Math i * 0.1 i 0.1 if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			} tmpa == a && tmpb == b tmpa == a tmpa a tmpb == b tmpb b {
				ans = i;
				break;
			} ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = -1;
		for(int i = 0; i < 20000; i++) {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
} public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = -1;
		for(int i = 0; i < 20000; i++) {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
} Main
import java.util.Scanner;


public class Main {


//	final int MOD = 1000000007;

	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

		long a = sc.nextLong();
		long b = sc.nextLong();

//		int n = sc.nextInt();


		//-------------------------------------------------------------------------------------

		ans = -1;
		for(int i = 0; i < 20000; i++) {
			double tmpa = Math.floor(i * 0.08);
			double tmpb = Math.floor(i * 0.1);
			if(tmpa == a && tmpb == b) {
				ans = i;
				break;
			}
		}

		//-------------------------------------------------------------------------------------

//		if(f) {
//			System.out.println("Yes");
//		} else {
//			System.out.println("No");
//		}

		System.out.println(ans);

		sc.close();
	}
}