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