Scanf.sscanf (read_line ()) "%d %d %d" (fun k n f -> let line2 = read_line () in let nums = List.map (fun s -> int_of_string s) (Str.split (Str.regexp " ") line2) in let sum = List.fold_left (+) 0 nums in let diff = (k * n) - sum in if diff < 0 then print_int (-1) else print_int diff; print_newline ());;