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