s = input()
n = len(s)
a = s.count('1')
b = s.count('0')
if a>=b:
  print(b*2)
else:
  print(a*2) s = input() s input() input n = len(s) n len(s) len s a = s.count('1') a s.count('1') s.count s count '1' b = s.count('0') b s.count('0') s.count s count '0' if a>=b:
  print(b*2)
else:
  print(a*2) a>=b a b print(b*2) print b*2 b 2 print(a*2) print a*2 a 2 n = len(s) len(s) n a = s.count('1') s.count('1') a b = s.count('0') s.count('0') b s = input() input() s
s = input()
n = len(s)
a = s.count('1')
b = s.count('0')
if a>=b:
  print(b*2)
else:
  print(a*2)