#34672: python 一行解


harrychang (noON3)


print((int(input())*0)+int(max(list(map(int, input().split(' '))))))