S = [int(_) for _ in input()]
length = 0
x =0
flag = True
if(len(S) == 1):
    flag = False
while(flag):
    x += 1

    if(S[x]+S[x-1] == 1):
        S.pop(x)
        S.pop(x-1)
        length += 2
        x=0
   
    if(x >= len(S)-1):
        break

print(length)
        