#include using namespace std; int main() { int64_t M; cin >> M; int64_t a = 1; for (int i = 0; i < 128; i++) a = a * 2 % M; cout << a << endl; }