n=int(input())
if n<0:
    print("Invalid input")
else:
    arr=list(map(int,input().split()))
    print(min(arr))