Scanf.sscanf (read_line ()) "%d" (fun n -> try let a = Array.init n (fun _ -> Scanf.sscanf (read_line ()) "%d" (fun a -> a)) in let module S = Set.Make (struct type t = int let compare = compare end) in let s = S.add (a.(0) + a.(1)) S.empty in let s = S.add (a.(1) + a.(2)) s in let s = S.add (a.(2) + a.(0)) s in let c = S.max_elt (S.remove (S.max_elt s) s) in Printf.printf "%d\n" c with _ -> print_endline "\"assert\"" )