let () =
  let a,b,c = Scanf.scanf "%d %d %d " (fun a b c -> a,b,c) in
  let l = [a;b;c] in
  let ls = List.sort compare l in
  let d2 = (List.nth ls 2) - (List.nth ls 0) in
  let d1 = (List.nth ls 2) - (List.nth ls 1) in

  Printf.printf "%d\n" @@
  if (d2+d1) mod 2 = 0 then (d2+d1)/2 else 2+((d2+d1)/2)





