m = int(input()) answer = 2**128 % m print(answer)