import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
//        sc.useDelimiter("\n");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int taxA, taxB;
        int ans = -1;
        
        for (int i = 1000; i >= 12; i--) {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        }
        pw.println(ans);
        
        pw.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
//        sc.useDelimiter("\n");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int taxA, taxB;
        int ans = -1;
        
        for (int i = 1000; i >= 12; i--) {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        }
        pw.println(ans);
        
        pw.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
//        sc.useDelimiter("\n");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int taxA, taxB;
        int ans = -1;
        
        for (int i = 1000; i >= 12; i--) {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        }
        pw.println(ans);
        
        pw.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
//        sc.useDelimiter("\n");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int taxA, taxB;
        int ans = -1;
        
        for (int i = 1000; i >= 12; i--) {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        }
        pw.println(ans);
        
        pw.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) 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 taxA taxA taxB; taxB int ans = -1; ans -1 1 for (int i = 1000; i >= 12; i--) {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        } int i = 1000; int i = 1000; i 1000 i >= 12 i 12 i-- i-- i {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        } {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        } taxA = (int) (i * 0.08) taxA (int) (i * 0.08) i 0.08 taxB = (int) (i * 0.10) taxB (int) (i * 0.10) i 0.10 if (a == taxA && b == taxB)   ans = i; a == taxA && b == taxB a == taxA a taxA b == taxB b taxB ans = i ans i pw.println(ans) pw.println pw ans pw.flush() pw.flush pw String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
//        sc.useDelimiter("\n");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int taxA, taxB;
        int ans = -1;
        
        for (int i = 1000; i >= 12; i--) {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        }
        pw.println(ans);
        
        pw.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
//        sc.useDelimiter("\n");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int taxA, taxB;
        int ans = -1;
        
        for (int i = 1000; i >= 12; i--) {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        }
        pw.println(ans);
        
        pw.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
//        sc.useDelimiter("\n");
//        DecimalFormat df = new DecimalFormat("0.00000000");
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int taxA, taxB;
        int ans = -1;
        
        for (int i = 1000; i >= 12; i--) {
            taxA = (int) (i * 0.08);
            taxB = (int) (i * 0.10);
//            pw.println(i + " " + taxA + " " + taxB);
            if (a == taxA && b == taxB)   ans = i;
        }
        pw.println(ans);
        
        pw.flush();
    }
}