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