x = int(eval(input()))

if x ==1:

  print((0))

else:

  print((1))
n = int(eval(input()))

  

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

n = int(eval(input()))
print((1 - n))

-x = int(eval(input())) -if x == 1: -    print((0)) -else: -    print((1)) +n = int(eval(input())) +print((1 - n))