fun main(args: Array<String>) {
    abc120c()
}

fun abc120c() {
    val s = readLine()!!.toCharArray()
    val redCount = s.count { it == '0' }
    val blueCount = s.size - redCount

    val remain = Math.abs(redCount - blueCount)

    val removedCount = (s.size - remain)

    println(removedCount)
}
