s = input()
n = len(s)
a = []
i = 0
ct = 0
for i in range(n):
  a.append(int(s[i]))
i = -1

while ct < n:
  n = len(a)
  i += 1
  if i >= n-1: break
  if a[i] == 0 and a[i+1] == 1:
    a.pop(i)
    a.pop(i)
    ct += 1
    i -= 2
    continue
  elif a[i] == 1 and a[i+1] == 0:
    a.pop(i)
    a.pop(i)
    ct += 1
    i -= 2
  if i <0 :i = 0
    
print(ct*2)