print(396, 199,flush=True) K = int(input()) if(K % 199 == 0): print(0) else: print(1)