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

print(count)