#28165: 真python絕對對解題法


2006teng@gmail.com (不幸福的巡撫)


a=input()

b=list(map(int,input().split( )))

print(max(b))