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