s = list(input())

ans = 0
i = 0
while i <= len(s)-2:
    if s[i] == '0' and s[i+1] == '1':
        del s[i+1]
        del s[i]
        ans += 2
        i = 0
    elif s[i] == '1' and s[i+1] == '0':
        del s[i+1]
        del s[i]
        ans += 2
        i = 0
    else:
        i += 1
print(ans)
