import java.util.Scanner

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val s = scanner.nextLine()
    println(solve(s))
}

fun solve(s: String): Int {
    var zero: Int = 0
    var one: Int = 0

    for (c in s) {
        if (c == '0') {
            zero++
        } else {
            one++
        }
    }

    return Math.min(one, zero) * 2
}
