output_description: Print the minimum value, maximum value and sum in a line. Put a single space
  between the values.
input_description: In the first line, an integer $n$ is given. In the next line, $n$ integers
  $a_i$ are given in a line.
attempt: ###
  ### atcorder test program
  ###
  
  
  ### math class
  class math:
      ### pi
      pi = 3.14159265358979323846264338
  
      ### GCD
      def gcd(self, a, b):
          if b == 0:
              return a
          return self.gcd(b, a % b)
  
  
  math = math()
  
  ### input sample
  # i = input()
  # A, B, C = [x for x in i.split()]
  # R = float(input())
  # A = [int(x) for x in input().split()]
  
  ### output sample
  # print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
  # print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
  
  N = int(input())
  mat = [int(w) for w in input().split()]
  
  print(min(mat), max(mat), sum(mat))
  
problem_description: Min, Max and Sum
  
  Write a program which reads a sequence of $n$ integers $a_i (i = 1, 2, ...
  n)$, and prints the minimum value, maximum value and sum of the sequence.
samples: [{"input": "10 1 5 4 17", "output": "17 37"}]