S = list(input())
i = 0
ans = 0
if len(S)==1:
    print(0)
    exit()
while (1):
    #print(ans, S, i)
    if (S[i]=="0" and S[i+1]=="1") or (S[i]=="1" and S[i+1]=="0"):
        del S[i:i+2]
        ans += 2
        i = 0
        if len(S)<=1:
            break
        continue
    if i>=len(S)-2:
        break
    else:
        i += 1
print(ans)