def f():
numbers = []
while True:
num = int(input())
if num == 0:
break
numbers.append(num)
return max(numbers)