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