s=input()
n=len(s)

count0=0
for i in range(n):
    if s[i]=='0':
        count0+=1

count1=n-count0

if count0<=count1:
    ans=count0*2
else:
    ans=count1*2

print(ans) s=input() s input() input n=len(s) n len(s) len s count0=0 count0 0 for i in range(n):
    if s[i]=='0':
        count0+=1 i range(n) range n if s[i]=='0':
        count0+=1 s[i]=='0' s[i] s i '0' count0+=1 count0 1 count1=n-count0 count1 n-count0 n count0 if count0<=count1:
    ans=count0*2
else:
    ans=count1*2 count0<=count1 count0 count1 ans=count0*2 ans count0*2 count0 2 ans=count1*2 ans count1*2 count1 2 print(ans) print ans count0+=1 1 count0 ans=count1*2 count1*2 ans s=input() input() s count1=n-count0 n-count0 count1 count0=0 0 count0 ans=count0*2 count0*2 ans n=len(s) len(s) n
s=input()
n=len(s)

count0=0
for i in range(n):
    if s[i]=='0':
        count0+=1

count1=n-count0

if count0<=count1:
    ans=count0*2
else:
    ans=count1*2

print(ans)