#1,0が隣り合ったところを取り出していく　

L = [int(i) for i in list(input())]
N = len(L)
count = 0
flag = 0

k = 0
while 1:
  flag = 0
  i = N - 1
  while (i != 0) and (i > 0) :
    if (((L[i - 1] == 1) and (L[i] == 0)) or ((L[i - 1] == 0) and (L[i] == 1))):
      del L[i - 1:i + 1]
      N = N - 2
      count += 2
      i -= 1
      flag = 1
    i -= 1

  if flag == 0:
    break

print(count)
