x=int(eval(input()))

if x==0:

  print("1")

else:

  print("0")
x=int(eval(input()))

if x==1:

  print("0")

else:

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

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

-if x == 0: +if x == 1: +    print("0") +else: -else: -    print("0")