s = list(input())
flag = True
ans = 0
while flag:
    flag = False
    if len(s) <= 1:
        break
    for i in range(len(s)-1):
        if s[i] == '0' and s[i+1] == '1' or s[i] == '1' and s[i+1] == '0':
            del s[i]
            del s[i]
            ans += 2
            flag = True
            break
print(ans)