import java.util
import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    var ans = 0
    for(i <- 1 to n) {
      var j = i
      var cnt = 0
      while(j%2==0) {
        j /= 2
        cnt += 1
      }
      ans = Math.max(ans, cnt)
    }
    println(ans)
  }
}
