fun main(args: Array<String>) {
    var S = readLine()!!.toString()
    var one=0
    var zero = 0
    S.map{x->
        if(x == '1') one++
        else zero++
    }
    println(one+zero - (Math.abs(one-zero)))
    
}
