import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val s = StringBuilder(sc.next())

    var ret = 0
    while (true) {
        var changed = false

        var i = 0
        while (i + 1 < s.length) {
            if ((s[i] == '0' && s[i + 1] == '1') || (s[i] == '1' && s[i + 1] == '0')) {
                s.deleteCharAt(i + 1)
                s.deleteCharAt(i)

                ret += 2
                changed = true
            } else {
                i++
            }
        }

        if (!changed) break
    }

    println(ret)
}