module IO = struct (* @since 4.04.0 *) let split_on_char sep s = let open String in let r = ref [] in let j = ref (length s) in for i = length s - 1 downto 0 do if get s i = sep then begin r := sub s (i + 1) (!j - i - 1) :: !r; j := i end done; sub s 0 !j :: !r let read_ss () = read_line () |> split_on_char ' ' end module B = Big_int let () = read_int () |> ignore; IO.read_ss () |> List.map B.big_int_of_string |> List.fold_left B.add_big_int B.zero_big_int |> B.string_of_big_int |> print_endline