s = input()
zero = 0
one = 0
for i in s:
  if i == '0':
    zero += 1
  else:
    one += 1

print(min(zero, one)*2) 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 print(min(zero, one)*2) print min(zero, one)*2 min(zero, one) min zero one 2 zero = 0 0 zero one = 0 0 one s = input() input() s zero += 1 1 zero one += 1 1 one
s = input()
zero = 0
one = 0
for i in s:
  if i == '0':
    zero += 1
  else:
    one += 1

print(min(zero, one)*2)
