Scanf.scanf "%d %d" (fun n k -> Printf.printf "%d\n" @@ if k <= n then k - 1 else -1 )