s = input()
zero = 0
one = 0
for i in s:
  if i == '0':
    zero += 1
  else:
    one += 1
ans = min(one, zero)
print((ans) << 1) s = input() s input() input zero = 0 zero 0 one = 0 one 0 for i in s:
  if i == '0':
    zero += 1
  else:
    one += 1 i s if i == '0':
    zero += 1
  else:
    one += 1 i == '0' i '0' zero += 1 zero 1 one += 1 one 1 ans = min(one, zero) ans min(one, zero) min one zero print((ans) << 1) print (ans) << 1 ans 1 s = input() input() s zero += 1 1 zero one = 0 0 one zero = 0 0 zero one += 1 1 one ans = min(one, zero) min(one, zero) ans
s = input()
zero = 0
one = 0
for i in s:
  if i == '0':
    zero += 1
  else:
    one += 1
ans = min(one, zero)
print((ans) << 1)
