import Foundation

var S = readLine()!

var ans = 0
while true {
    if let range = S.rangeOfString("10") {
        S.removeRange(range)
        ans += 1
    } else if let range = S.rangeOfString("01") {
        S.removeRange(range)
        ans += 1
    } else {
        break
    }
}

print(ans*2)