<reponame>sireline/PyCode
N = int(input())
#N, M = [int(n) for n in input().split()]
print(1 if not N else 0)

N = int(input())
#N, M = [int(n) for n in input().split()]
print(1 if not N else 0)
#N, M = [int(n) for n in input().split()]