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();
    if((4*B-5*A>=5)||(5*A-4*B>=4)){System.out.println(-1);}
    else{if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);}
        }
  }
} 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();
    if((4*B-5*A>=5)||(5*A-4*B>=4)){System.out.println(-1);}
    else{if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);}
        }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    if((4*B-5*A>=5)||(5*A-4*B>=4)){System.out.println(-1);}
    else{if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);}
        }
  } main {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    if((4*B-5*A>=5)||(5*A-4*B>=4)){System.out.println(-1);}
    else{if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);}
        }
  } 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 if((4*B-5*A>=5)||(5*A-4*B>=4)){System.out.println(-1);}
    else{if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);}
        } (4*B-5*A>=5)||(5*A-4*B>=4) (4*B-5*A>=5) 4*B-5*A 4*B 4 B 5*A 5 A 5 (5*A-4*B>=4) 5*A-4*B 5*A 5 A 4*B 4 B 4 {System.out.println(-1);} System.out.println(-1) System.out.println System.out System System.out -1 1 {if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);}
        } if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);} 5*A-4*B<=0 5*A-4*B 5*A 5 A 4*B 4 B 0 {System.out.println(10*B);} System.out.println(10*B) System.out.println System.out System System.out 10*B 10 B { int C=25*A%2;
         System.out.println((25*A+C)/2);} int C=25*A%2; C 25*A%2 25*A 25 A 2 System.out.println((25*A+C)/2) System.out.println System.out System System.out (25*A+C)/2 (25*A+C) 25*A 25 A C 2 String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    if((4*B-5*A>=5)||(5*A-4*B>=4)){System.out.println(-1);}
    else{if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);}
        }
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    if((4*B-5*A>=5)||(5*A-4*B>=4)){System.out.println(-1);}
    else{if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);}
        }
  }
} 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();
    if((4*B-5*A>=5)||(5*A-4*B>=4)){System.out.println(-1);}
    else{if(5*A-4*B<=0){System.out.println(10*B);}
    else{ int C=25*A%2;
         System.out.println((25*A+C)/2);}
        }
  }
}