S = list(input())
count = 0
while True:
    if '1' not in S or '0' not in S:
        break
    L = len(S)
    for i in range(L):
        if i < L-1 and (S[i] == '0' and S[i+1] == '1' or S[i] == '1' and S[i+1] == '0'):
            count += 2
            S = S[:i] + S[i+2:]
            break
print(count)