s=list(input())
c0=0
c1=0
for i in range(len(s)):
    if s[i]=="0":c0+=1
    else: c1+=1
print(2*min(c0,c1)) s=list(input()) s list(input()) list input() input c0=0 c0 0 c1=0 c1 0 for i in range(len(s)):
    if s[i]=="0":c0+=1
    else: c1+=1 i range(len(s)) range len(s) len s if s[i]=="0":c0+=1
    else: c1+=1 s[i]=="0" s[i] s i "0" print(2*min(c0,c1)) print 2*min(c0,c1) 2 min(c0,c1) min c0 c1 c0=0 0 c0 c1=0 0 c1 s=list(input()) list(input()) s
s=list(input())
c0=0
c1=0
for i in range(len(s)):
    if s[i]=="0":c0+=1
    else: c1+=1
print(2*min(c0,c1))
