let rec loop i sum = if i = 9 then sum else loop (i + 1) (Scanf.scanf " %d" (fun i -> sum - i)) in loop 0 55 |> Printf.printf "%d\n"