S=str(input())
Slist=list(S)
horyu=[]
Slen=len(S)
count=0
for i in range(Slen):
    if Slist[i] == "0":
        if "1" in horyu:
            horyu.remove("1")
            count+=1
        else:
            horyu.append("0")
    else:
        if "0" in horyu:
            horyu.remove("0")
            count+=1
        else:
            horyu.append("1")
print(count*2)