n = int(eval(input()))



if n == 0:

    print((1))

elif n == 1:

    print((0))

n = int(eval(input()))



print((0 if n == 1 else 1))

n = int(eval(input()))
if n == 0:
    print((1))
elif n == 1:
    print((0))

n = int(eval(input()))
print((0 if n == 1 else 1))

-if n == 0: -    print((1)) -elif n == 1: -    print((0)) +print((0 if n == 1 else 1))