M = int(input()) ans = 2 ** 128 print(ans % M)