Scanf.scanf "%d" (fun n -> let a = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a)) in Scanf.scanf " %d" (fun v -> Printf.printf "%d\n" @@ Array.fold_left (+) 0 a - v ) )