ans=0

def br(s):
  global ans
  ns=[]
  fl=True
  i=0
  while i <len(s):
    if s[i:i+2]==["0","1"] or s[i:i+2]==["1","0"]:
      ans+=2
      i+=1
      fl=False
    else:
      ns.append(s[i])
    i+=1

  if fl or len(ns)==0:
    return 0
  else:
    br(ns)

br(list(input()))
print(ans)