s = input()
cnt = 0
tmp = ''
hit = True
while(hit):
	hit = False
	for i in range(1, len(s)):
		if s[i-1:i+1] == '01' or s[i-1:i+1] == '10':
			tmp = s[0:i-1] + s[i+1: ]
			cnt += 2
			hit = True
			s = tmp
			break
            
print (cnt)