fun main(args: Array<String>){
    val s = readLine()!!
    var cnt0 = 0
    var cnt1 = 0
    for(i in 0..(s.length - 1)){
        if(s[i] == '0') cnt0++
        else cnt1++
    }
    println(listOf(cnt0, cnt1).min()!! * 2)
}
