let max_list lst = List.fold_left (fun a b -> if a > b then a else b) (List.hd lst) lst
let min_list lst = List.fold_left (fun a b -> if a < b then a else b) (List.hd lst) lst

let () = 
    Scanf.scanf "%d %d %d" @@ fun a b c -> 
        let lst = [a;b;c] in
        Printf.printf "%d\n" @@ max_list lst - min_list lst
