#include using namespace std; template bool cmin(A& a, B b) { return a > b && (a = b, true); } template bool cmax(A& a, B b) { return a < b && (a = b, true); } signed main() { cin.tie(nullptr)->sync_with_stdio(false); long N; cin >> N; long ans = 1; while ((long double)ans * 2 <= N) ans *= 2; cout << ans << '\n'; }