S =list(input())
L =list(map(int,S))

n = 0
X = 0
while X<1:
	# print(L)
	K = len(L)-1
	# print(K)
	for i in range(K):
		if L[i]+L[i+1]==1:
			L.pop(i)
			L.pop(i)
			n=n+1
			break
		elif i == K-1:
			X=1

# print(L)
print(n*2)