let () = Scanf.scanf "%d %d" @@ fun a b ->
  Printf.printf "%d\n" @@
  try
    List.find (fun i -> 2 * i / 25 = a && i / 10 = b) @@
    Array.to_list @@
    Array.init 20000 @@ fun i -> i
  with Not_found -> -1