def main(): m = int(input()) print((2 ** 128) % m) if __name__ == '__main__': main()