import java.util.*

private fun readInts() = readLine()!!.split(" ").map { it.toInt() }
private fun readLongs() = readLine()!!.split(" ").map { it.toLong() }
private fun <K, V> Map<out K, V>.toMutableMap(): MutableMap<K, V> = LinkedHashMap(this)
private fun <K, V> mutableMapOf(): MutableMap<K, V> = LinkedHashMap()
private fun <K, V> mutableMapOf(vararg pairs: Pair<K, V>) = pairs.toMap().toMutableMap()

fun main(args: Array<String>) {
    val S = readLine()!!.asSequence()

    val black = S.count { it == '0' }
    val white = S.count { it == '1' }
    val diff = Math.abs(black - white)

    println(2 * (Math.max(black, white) - diff))
}