
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
	;
		int max = (int) Math.max(a,b);
		int ans= -1;
		for(int i = max ; i < 10001 ;i ++) {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			}
		System.out.println(ans);
	}
	
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
	;
		int max = (int) Math.max(a,b);
		int ans= -1;
		for(int i = max ; i < 10001 ;i ++) {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			}
		System.out.println(ans);
	}
	
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
	;
		int max = (int) Math.max(a,b);
		int ans= -1;
		for(int i = max ; i < 10001 ;i ++) {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
	;
		int max = (int) Math.max(a,b);
		int ans= -1;
		for(int i = max ; i < 10001 ;i ++) {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int max = (int) Math.max(a,b); max (int) Math.max(a,b) Math.max Math a b int ans= -1; ans -1 1 for(int i = max ; i < 10001 ;i ++) {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			} int i = max ; int i = max ; i max i < 10001 i 10001 i ++ i ++ i {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			} {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			} if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			} Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b Math.floorDiv(i*2, 25) == a Math.floorDiv(i*2, 25) Math.floorDiv Math i*2 i 2 25 a Math.floorDiv(i, 10) == b Math.floorDiv(i, 10) Math.floorDiv Math 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 sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
	;
		int max = (int) Math.max(a,b);
		int ans= -1;
		for(int i = max ; i < 10001 ;i ++) {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			}
		System.out.println(ans);
	}
	
} public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
	;
		int max = (int) Math.max(a,b);
		int ans= -1;
		for(int i = max ; i < 10001 ;i ++) {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			}
		System.out.println(ans);
	}
	
} Main

import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
	;
		int max = (int) Math.max(a,b);
		int ans= -1;
		for(int i = max ; i < 10001 ;i ++) {
			if(Math.floorDiv(i*2, 25) == a && Math.floorDiv(i, 10) == b ) {
				ans = i;
				break;
			}
			}
		System.out.println(ans);
	}
	
}
