s = input()
a = 0
b = 0
for c in s:
	if c == '0':
		a += 1
	else:
		b += 1
print(min(a, b) * 2) s = input() s input() input a = 0 a 0 b = 0 b 0 for c in s:
	if c == '0':
		a += 1
	else:
		b += 1 c s if c == '0':
		a += 1
	else:
		b += 1 c == '0' c '0' a += 1 a 1 b += 1 b 1 print(min(a, b) * 2) print min(a, b) * 2 min(a, b) min a b 2 a += 1 1 a b += 1 1 b a = 0 0 a s = input() input() s b = 0 0 b
s = input()
a = 0
b = 0
for c in s:
	if c == '0':
		a += 1
	else:
		b += 1
print(min(a, b) * 2)