#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); long long n; cin >> n; vector p; for (int i = 0; i < 60; i++) { if (n & (1LL << i)) { p.push_back(i); } } cout << (1LL << p.back()) << endl; }