while True:
    input = int(raw_input())
    if input == 42:
        break