a=input()
size=len(a)
a=int(a)
num=[]
b=0
for j in range(size):
  if(a%10==1):
    num.insert(0,1)
  else:
    num.insert(0,0)
  a=int(a/10)
count=0
d=0
i=0
while(d==0):
  if(len(num)==0): break
  if(len(num)==1): break
  if(i==len(num)-1): break
  if(num[i]!=num[i+1]):
    num.pop(i)
    num.pop(i)
    i=-1
    count+=2
  i+=1
print(count)