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