let split_int str =
  let rec split_inner ct b=
    if String.length str = ct then [int_of_string b]
    else
      match str.[ct] with
        ' ' -> (int_of_string b)::split_inner (ct+1) ""
      | c -> split_inner (ct+1) (b^(Char.escaped c))
  in split_inner 0 "";;

let f x =
  let line = read_line () in
  let l = split_int line in
  let min = List.fold_left (fun x y-> min x y) 1000000 l in
  let max = List.fold_left (fun x y-> max x y) (-1000000) l in
  let sum = List.fold_left (fun x y-> x+y) 0 l in
  Printf.printf "%d %d %d\n" min max sum;;

let () = Scanf.scanf "%d\n" f;;