S=input()


S=[s for s in S]

count=0
i=0
while(i<len(S)-1):
#	print(i,S)
	if(int(S[i])+int(S[i+1])==1):
		count+=2
		if(i<=len(S)-3):
			S=S[:i]+S[i+2:]
		elif(i==len(S)-2):
			break
				
		if(i>0):
			i-=1
	else:
		i+=1

print(count)