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.
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d %d' % (min(a), max(a), sum(a)))

if __name__ == "__main__":
    main()

def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    n = int(input())
    a = numinput()
    print('%d %d %d' % (min(a), max(a), sum(a)))

if __name__ == "__main__":
    main()
