object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt

  val ls = (1 to 100).map { i =>
    if (i % 2 != 0) 0 else {
      var j = i
      var c = 0
      while(j % 2 == 0) {
        j /= 2
        c += 1
      }
      c
    }
  }
  val lss = ls.take(n)
  val max = lss.max
  println(lss.indexWhere(_ == max) + 1)
}