let () =
  let a,b = Scanf.scanf "%d %d " (fun a b -> a,b) in

  let h_arr = Array.init 1000 (fun _ -> 0) in
  for i = 1 to 999 do
    h_arr.(i) <- h_arr.(i-1)+i
  done;
  let d = b - a in

  Printf.printf "%d\n" (h_arr.(d) - b)
