#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #include #define all(v) v.begin(),v.end() #define mp(a,b) make_pair(a,b) #define eb(v) emplace_back(v) #define fast cin.tie(nullptr);ios_base::sync_with_stdio(false) using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; //using mint = modint1000000007; using ld = long double; using graph = vector>; constexpr ll mod = 998244353; //constexpr ll mod = 1e9 + 7; constexpr ll inf = 1e18; ll n; int main() { fast; cin >> n; for (int i = 60; i >= 0; i--) { ll bit = (1ll << i); if (n & bit) { cout << bit; return 0; } } }