S=input()
n0,n1=0,0
for s in S:
  if s=='1':
    n1+=1
  elif s=='0':
    n0+=1
print(min(n1,n0)*2) S=input() S input() input n0,n1=0,0 n0 0 n1 0 for s in S:
  if s=='1':
    n1+=1
  elif s=='0':
    n0+=1 s S if s=='1':
    n1+=1
  elif s=='0':
    n0+=1 s=='1' s '1' n1+=1 n1 1 elif s=='0':
    n0+=1 s=='0' s '0' n0+=1 n0 1 print(min(n1,n0)*2) print min(n1,n0)*2 min(n1,n0) min n1 n0 2 S=input() input() S n1=0,0 0 n1 n0,n1=0,0 0 n0 n1+=1 1 n1 n0+=1 1 n0
S=input()
n0,n1=0,0
for s in S:
  if s=='1':
    n1+=1
  elif s=='0':
    n0+=1
print(min(n1,n0)*2)