#line 1 "main.cpp" #include using namespace std; using lint = long long; void solve() { lint n; cin >> n; for (int i = 60; i >= 0; --i) { if ((n >> i) & 1) { cout << (1LL << i) << "\n"; return; } } } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); solve(); return 0; }