#ABC120C-Unification.py

from sys import stdin

input = stdin.readline

S = input()

Nblock = 0

while '0' in S and '1' in S:
    for i in range(len(S)-1):
        if S[i:i+1] != S[i+1:i+2]:
            Nblock += 2
            S = S[:i] + S[i+2:]
            break

print(Nblock)
