a=int(input()) b=[] b.append(int(input().split())) c=10000000000 for i in range(0,a): if b[i]<c: c=b[i] print(c)