import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int p = Math.max((25 * A - 1) / 2 + 1, 10 * B);
    if (p >= 10 * B + 10 || 2 * p >= 25 * A + 25) {
      System.out.println(-1);
    } else {
      System.out.println(p);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int p = Math.max((25 * A - 1) / 2 + 1, 10 * B);
    if (p >= 10 * B + 10 || 2 * p >= 25 * A + 25) {
      System.out.println(-1);
    } else {
      System.out.println(p);
    }
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int p = Math.max((25 * A - 1) / 2 + 1, 10 * B);
    if (p >= 10 * B + 10 || 2 * p >= 25 * A + 25) {
      System.out.println(-1);
    } else {
      System.out.println(p);
    }
  } main {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int p = Math.max((25 * A - 1) / 2 + 1, 10 * B);
    if (p >= 10 * B + 10 || 2 * p >= 25 * A + 25) {
      System.out.println(-1);
    } else {
      System.out.println(p);
    }
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner int p = Math.max((25 * A - 1) / 2 + 1, 10 * B); p Math.max((25 * A - 1) / 2 + 1, 10 * B) Math.max Math (25 * A - 1) / 2 + 1 (25 * A - 1) / 2 (25 * A - 1) 25 * A 25 A 1 2 1 10 * B 10 B if (p >= 10 * B + 10 || 2 * p >= 25 * A + 25) {
      System.out.println(-1);
    } else {
      System.out.println(p);
    } p >= 10 * B + 10 || 2 * p >= 25 * A + 25 p >= 10 * B + 10 p 10 * B + 10 10 * B 10 B 10 2 * p >= 25 * A + 25 2 * p 2 p 25 * A + 25 25 * A 25 A 25 {
      System.out.println(-1);
    } System.out.println(-1) System.out.println System.out System System.out -1 1 {
      System.out.println(p);
    } System.out.println(p) System.out.println System.out System System.out p String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int p = Math.max((25 * A - 1) / 2 + 1, 10 * B);
    if (p >= 10 * B + 10 || 2 * p >= 25 * A + 25) {
      System.out.println(-1);
    } else {
      System.out.println(p);
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int p = Math.max((25 * A - 1) / 2 + 1, 10 * B);
    if (p >= 10 * B + 10 || 2 * p >= 25 * A + 25) {
      System.out.println(-1);
    } else {
      System.out.println(p);
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int p = Math.max((25 * A - 1) / 2 + 1, 10 * B);
    if (p >= 10 * B + 10 || 2 * p >= 25 * A + 25) {
      System.out.println(-1);
    } else {
      System.out.println(p);
    }
  }
}
