S = str(input())
i, ans = 0, 0
if len(S) <= 1:
    print(0)
    exit()

while i < abs(len(S)-S.count("1")):
    if S[i] != S[i+1]:
        S = S[:i]+S[i+2:]
        i = -1
        ans += 2
    i += 1
print(ans)
