#include <iostream>
using namespace std;

int main() {
    int N;
    cin >> N;

    while (N <= 1000) {
        if (N * 2 > 1000) {
            break;
        }
        N *= 2;
    }

    cout << N << endl;
    return 0;
}