private fun getInts() : List<Int> {
    return readLine()!!.split(" ").map {it.toInt()}
}

fun main(args: Array<String>) {
    var N = getInts()[0] / 2
    var pt = 0
    while (N > 0) {
        pt++
        N /= 2
    }

    var ans = 1
    (0..pt - 1).forEach {
        ans *= 2
    }
    println(ans)
}
