while True:
try:
x = input().strip('\r')
list1 = input().strip('\r').split(' ')
list2 = [int(x) for x in list1]
print(max(list2))
except EOFError:
break