#include <iostream>

using namespace std;

int max(int n){
    int k = 0;
    while((1 << k) <= n){
        k++;        
    }
    return k-1;
}
int main() {
    int n;
    cin >> n;
    if (n == 1){
        cout << 1;
        return 0;
    }
        int k = 1 << max(n);
    cout << k;

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: