#include #include #include #include #include #include #include #include #include using namespace std; #define rep(i,n) for(int i=0;i=0;i--) #define skip(i,n,p) for(int i=0;i ostream& operator << (ostream& ostr, const vector<_Ty>& v) { for(int i = 0; i < (int) v.size(); i++) { ostr << v[i] << (i + 1 != v.size() ? " " : ""); } return ostr; } template ostream& operator << (ostream& ostr, const map<_K, _V>& v) { ostr << "{"; for (auto iter = v.begin(); iter != v.end(); ++iter) { ostr << (*iter).first << ": " << (*iter).second << ", "; } ostr << "}"; return ostr; } template ostream& operator << (ostream& ostr, const set<_K>& v) { for (auto iter = v.begin(); iter != v.end(); ++iter) { ostr << *iter << (iter != v.end() ? " " : ""); } return ostr; } template ostream& operator << (ostream& ostr, const pair<_K, _V>& v) { ostr << v.first << " " << v.second; return ostr; } int64 gcd(int64 a, int64 b) { if (a < b) a, b = b, a; if (a % b == 0) return b; return gcd(b, a % b); } int64 modinv(int64 a, int64 m) { int64 b = m, u = 1, v = 0; while (b) { int64 t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= m; if (u < 0) u += m; return u; } // https://en.wikipedia.org/wiki/Trial_division map f(int64 n) { map m; while (n % 2 == 0) { m[2]++; n = n / 2; } int64 c = 3; while (c * c <= n) { if (n % c == 0) { n = n / c; m[c]++; } else { c += 2; } } if (n != 1) m[n]++; return m; } template class SegmentTree { private: int n; vector data; function operation; function change; public: SegmentTree(vector d, function _operation, function _change) : operation(_operation), change(_change) { n = 1; while (n < d.size()) n *= 2; data.resize(n * 2 - 1, INF); rep(i, d.size()) data[data.size() - n + i] = d[i]; rev(i, data.size() - n) data[i] = operation(data[i*2+1], data[i*2+2]); } void update(int index, T val) { index += n - 1; data[index] = change(data[index], val); while (index != 0) { index = (index - 1) / 2; data[index] = operation(data[index*2+1], data[index*2+2]); } } T query(int a, int b, int k=0, int l=0, int r=-1) { if (r < 0) r = n; if (r <= a || b <= l) return INF; if (a <= l && r <= b) return data[k]; T left = query(a, b, k*2+1, l, (l+r)/2); T right = query(a, b, k*2+2, (l+r)/2, r); return operation(left, right); } T operator[](int index) { return data[index + n - 1]; } }; int main() { int64 N; cin >> N; int64 n = 1; rep(_, 128) { n *= 2; n %= N; } cout << n << endl; }