s=input()
k=len(s)
a=0
b=0
for i in range(k):
  if s[i]=='0':
    a+=1
  else:
    b+=1
print(min(a,b)*2) s=input() s input() input k=len(s) k len(s) len s a=0 a 0 b=0 b 0 for i in range(k):
  if s[i]=='0':
    a+=1
  else:
    b+=1 i range(k) range k if s[i]=='0':
    a+=1
  else:
    b+=1 s[i]=='0' s[i] s i '0' a+=1 a 1 b+=1 b 1 print(min(a,b)*2) print min(a,b)*2 min(a,b) min a b 2 a=0 0 a a+=1 1 a b+=1 1 b s=input() input() s k=len(s) len(s) k b=0 0 b
s=input()
k=len(s)
a=0
b=0
for i in range(k):
  if s[i]=='0':
    a+=1
  else:
    b+=1
print(min(a,b)*2)