print(([1,0][eval(input())=='1']))
print((1-int(eval(input()))))
print(([1, 0][eval(input()) == "1"]))

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

-print(([1, 0][eval(input()) == "1"])) +print((1 - int(eval(input()))))