a = input()
s = [int(i) for i in a]
count = 0
ans = 0
while True:
    if (len(s) == count+1) or len(s) == 0:
        break
    if (s[count] == 0 and s[count+1] == 1) or (s[count] == 1 and s[count+1] == 0):
        ans += 1
        s.pop(count)
        s.pop(count)
        count -= 1
    else:
        count += 1
print(ans*2)
