s = input()
r = 0
b = 0

for i in range(len(s)):
  if s[i] == '0':
    r += 1
  else:
    b += 1
if r > b:
  print(b*2)
else:
  print(r*2) s = input() s input() input r = 0 r 0 b = 0 b 0 for i in range(len(s)):
  if s[i] == '0':
    r += 1
  else:
    b += 1 i range(len(s)) range len(s) len s if s[i] == '0':
    r += 1
  else:
    b += 1 s[i] == '0' s[i] s i '0' r += 1 r 1 b += 1 b 1 if r > b:
  print(b*2)
else:
  print(r*2) r > b r b print(b*2) print b*2 b 2 print(r*2) print r*2 r 2 r += 1 1 r s = input() input() s r = 0 0 r b += 1 1 b b = 0 0 b
s = input()
r = 0
b = 0

for i in range(len(s)):
  if s[i] == '0':
    r += 1
  else:
    b += 1
if r > b:
  print(b*2)
else:
  print(r*2)