S = input()

red = 0  # 0
blue = 0 # 1
m = 0
for s in S:
	if s = '0':
		if blue != 0:
			blue -= 1
			m += 2
		else:
			red += 1
	elif s = '1':
		if red != 0:
			red -= 1
			m += 2
		else:
			blue += 1

print(m)