S = list(input())
Quve = []
count = 0
flag = 0
for i in range(len(S)):
    if int(S[i])==0:
        Quve.append("a")#赤文字をaで表記
    else:
        Quve.append("b")
Quve.append("")
while(flag ==0):
    tmp = count
    for i in range(len(Quve)-1):
        if ((Quve[i]=="a") & (Quve[i+1]=="b")) | ((Quve[i]=="b") & (Quve[i+1]=="a")):
            del Quve[i]
            del Quve[i]
            count += 2
            break
    if (tmp == count):
        flag = 1
print(count)
