import math inputer= int(input()) baser =math.pow(2,128) result = baser%inputer print(result)