def resolve():
	S=input()
	chk=1
	cnt=0
	while chk==1:
		chk=0
		if len(S)==0:
			break
		if '10' in S:
			S=S.replace('10','',1)
			chk=1
			cnt+=1
		if '01' in S:
			S=S.replace('01','',1)
			chk=1
			cnt+=1
	print(cnt*2)
resolve()