sum = int(input())
while sum < 42:
    print(sum)
    sum = int(input())