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