#31749: python解法


alanyeh10@gmail.com (皮卡)


while True:
    try:
        n=int(input())#其實根本沒用到這行哈哈哈
        print(max(list(map(int,input().split()))))
    except:
        break