S = list(input())
i = 0
count = 0

while True:
    if S[i:i+2] == ["0","1"] or S[i:i+2] == ["1","0"]:
        S.pop(i)
        S.pop(i)
        count += 2
        i = 0
    else:
        i+=1
    if len(S)-1 < i:
        break
print(count)