import sys read = sys.stdin.buffer.read m = int(read()) print((1 << 128) % m)