object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val iobuf = readLine.split(" ").map(_.toInt).head
    import scala.math.log
    val x = (log(iobuf) / log(2)).toInt
    import scala.math.pow
    val ans = pow(2, x).toInt
    println(ans)
  }
}
