#!/usr/bin/env python3 i = int(input()) print(2 ** 128 % i)