#include #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (int i = (a); i < (b); ++i) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define ALL(x) x.begin(), x.end() #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) using namespace std; random_device rnd; mt19937 mt(rnd()); using ll = long long; using lld = long double; using VI = vector; using VVI = vector; using VL = vector; using VVL = vector; using PII = pair; const int IINF = 1 << 30; const ll INF = 1ll << 60; const ll MOD = 1000000007; int popcount(ll n) { int ret = 0; while (n) { ret *= n & 1; n >>= 1; } return ret; } int main() { ll n; cin >> n; ll ans = 0; ll bit = 1; while (n) { n >>= 1; bit <<= 1; } bit >>= 1; cout << bit << endl; }