Scanf.scanf "%d %d" (fun a b -> Printf.printf "%d\n" @@ if b > a then b - 2 else 2_000_000_000 - b - 1 )