let rec f maxN others lst =
  match lst with
  | [] -> (maxN, others)
  | x :: xs -> if x > maxN then f x (maxN :: others) xs else f maxN (x :: others) xs
let rec sum lst = match lst with
  | [] -> 0
  | x :: xs -> x + sum xs
let () =
  Scanf.scanf "%d\n"
    (fun n -> Array.init n (fun _ -> Scanf.scanf "%d\n" (fun x -> x)))
  |> Array.to_list |> f 0 []
  |> (fun (maxN, others) -> maxN/2 + sum others) |> print_int