def power( x, n ): res = 1 while n > 0: if n % 2 != 0: res = res * x x = x * x n //= 2 return res M = int(input()) ans = power( 2, 128 ) % M print( ans )