import sys def input(): return sys.stdin.readline().rstrip('\n') def main(): print(2**128 % int(input())) if __name__ == '__main__': main()