function Main(input) {
    input = input;
    list = [64, 32, 16, 8, 4, 2, 1];
    for(i = 0; i < list.length; i++) {
        if(list[i] <= input) {
            console.log(list[i]);
            break;
        }
    }
    
    }
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));