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