S = input()

cnt = 0
while True:
  f0 = S.find("01")
  f1 = S.find("10")
  if f0 >= 0:
#    print ("01", f0, S[:f0], S[f0+2:])
    S = S[:f0] + S[f0+2:]
    cnt += 2
  elif f1 >= 0:
#    print ("10", f1, S[:f1], S[f1+2:])
    S = S[:f1] + S[f1+2:]
    cnt += 2
  else:
    break
print (cnt)
  