var main = function main(input) {
    var N = +input

    for (var x = 2; x < 100; x = x * 2) {
        if (x > N) break; 
    }
    
    console.log(x/2)
   
}
 
main(require('fs').readFileSync('/dev/stdin', 'utf-8'))
