import java.util.*;
public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int B = sc.nextInt();
      
      // 条件を満たす値段の探索
      int result = -1;
      for(int i = 0; i < 2000; i++){
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      }
      
      // 出力
      System.out.println(result);
    }
    
    // 消費税を計算する関数
    public static int getTax(int base, int rate){
      return base * rate / 100;
    }
    


} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int B = sc.nextInt();
      
      // 条件を満たす値段の探索
      int result = -1;
      for(int i = 0; i < 2000; i++){
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      }
      
      // 出力
      System.out.println(result);
    }
    
    // 消費税を計算する関数
    public static int getTax(int base, int rate){
      return base * rate / 100;
    }
    


} Main public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int B = sc.nextInt();
      
      // 条件を満たす値段の探索
      int result = -1;
      for(int i = 0; i < 2000; i++){
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      }
      
      // 出力
      System.out.println(result);
    } main {
      // 入力
      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int B = sc.nextInt();
      
      // 条件を満たす値段の探索
      int result = -1;
      for(int i = 0; i < 2000; i++){
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      }
      
      // 出力
      System.out.println(result);
    } 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 int result = -1; result -1 1 for(int i = 0; i < 2000; i++){
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      } int i = 0; int i = 0; i 0 i < 2000 i 2000 i++ i++ i {
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      } {
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      } int tax8 = getTax(i, 8); tax8 getTax(i, 8) getTax i 8 int tax10 = getTax(i, 10); tax10 getTax(i, 10) getTax i 10 if(tax8 == A && tax10 == B){
          result = i;
          break;
        } tax8 == A && tax10 == B tax8 == A tax8 A tax10 == B tax10 B {
          result = i;
          break;
        } result = i result i break; System.out.println(result) System.out.println System.out System System.out result String[] args args // 消費税を計算する関数
    public static int getTax(int base, int rate){
      return base * rate / 100;
    } getTax {
      return base * rate / 100;
    } return base * rate / 100; base * rate / 100 base * rate base rate 100 int base base int rate rate public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int B = sc.nextInt();
      
      // 条件を満たす値段の探索
      int result = -1;
      for(int i = 0; i < 2000; i++){
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      }
      
      // 出力
      System.out.println(result);
    }
    
    // 消費税を計算する関数
    public static int getTax(int base, int rate){
      return base * rate / 100;
    }
    


} public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int B = sc.nextInt();
      
      // 条件を満たす値段の探索
      int result = -1;
      for(int i = 0; i < 2000; i++){
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      }
      
      // 出力
      System.out.println(result);
    }
    
    // 消費税を計算する関数
    public static int getTax(int base, int rate){
      return base * rate / 100;
    }
    


} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int B = sc.nextInt();
      
      // 条件を満たす値段の探索
      int result = -1;
      for(int i = 0; i < 2000; i++){
        int tax8 = getTax(i, 8);
        int tax10 = getTax(i, 10);
        
        // 条件に一致した場合
        if(tax8 == A && tax10 == B){
          result = i;
          break;
        }
        
      }
      
      // 出力
      System.out.println(result);
    }
    
    // 消費税を計算する関数
    public static int getTax(int base, int rate){
      return base * rate / 100;
    }
    


}