#55362: python


ka2453@cnc.km.edu.tw (金湖國中Owen)


不會請反白

while True :
 try:
  n=int(input())
  num=list(map(int,input().split()))
  print(max(num))
 except:
  break