N = gets.to_i puts 2.pow(N.bit_length - 1)