import java.util.Scanner
import scala.math._

object Main extends App {

  val sc = new Scanner(System.in)

  val N = sc.nextInt()

  val ans = for (i <- 1 to N) yield help(i)

  println(ans.indexOf(ans.max)+1)

  def help(n: Int): Int = if (n % 2 == 0) 1 + help(n / 2) else 0

}


