import java.io.*;
import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ans = -1;
		
		for(int i = 1;i <= 10000;i ++) {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ans = -1;
		
		for(int i = 1;i <= 10000;i ++) {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ans = -1;
		
		for(int i = 1;i <= 10000;i ++) {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ans = -1;
		
		for(int i = 1;i <= 10000;i ++) {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int ans = -1; ans -1 1 for(int i = 1;i <= 10000;i ++) {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		} int i = 1; int i = 1; i 1 i <= 10000 i 10000 i ++ i ++ i {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		} {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		} if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			} i * 2 / 25 == a && i / 10 == b i * 2 / 25 == a i * 2 / 25 i * 2 i 2 25 a i / 10 == b i / 10 i 10 b {
				ans = i;
				break;
			} ans = i ans i break; 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 scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ans = -1;
		
		for(int i = 1;i <= 10000;i ++) {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
} public class Main {
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ans = -1;
		
		for(int i = 1;i <= 10000;i ++) {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
} Main
import java.io.*;
import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ans = -1;
		
		for(int i = 1;i <= 10000;i ++) {
			if(i * 2 / 25 == a && i / 10 == b) {
				ans = i;
				break;
			}
		}
		System.out.println(ans);
	}
}