S = list(input())
count = 0
while True:
  smash = 0
  for i in range(len(S)):
    if len(S) < 2:
      break
    if i > len(S)-2:
      break
    if S[i] == '0':
      if S[i+1] == '1':
        del S[i:i+2]
        count += 2
        smash = 1
    elif S[i] == '1':
      if S[i+1] == '0':
        del S[i:i+2]
        count += 2
        smash = 1
  if len(S) == 0:
    break
  if smash == 0:
    break
  continue

print(count)