S = list(input())
Quve = S
count = 0
flag = 0
Quve.append("")
while(flag ==0):
    tmp = count
    for i in range(len(Quve)-1):
        if ((Quve[i]=="0") & (Quve[i+1]=="1")) | ((Quve[i]=="1") & (Quve[i+1]=="0")):
            del Quve[i]
            del Quve[i]
            count += 2
            break
    if (tmp == count):
        flag = 1
print(count)
