M = int(input()) x = 2**128 Answer = x%M print(Answer)