let rec range a b = if a >= b then [] else a::(range (a+1) b)

let f a b =
  range a (b + 1) |> List.fold_left (lxor) 0

let _ =
  let a, b = Scanf.scanf "%d %d\n" (fun a b -> (a, b)) in
  f a b |> print_int