S=input()
z=0
o=0
for i in range(len(S)):
    if S[i]=="0":
        z+=1
    elif S[i]=="1":
        o+=1
print(2*min(z,o)) S=input() S input() input z=0 z 0 o=0 o 0 for i in range(len(S)):
    if S[i]=="0":
        z+=1
    elif S[i]=="1":
        o+=1 i range(len(S)) range len(S) len S if S[i]=="0":
        z+=1
    elif S[i]=="1":
        o+=1 S[i]=="0" S[i] S i "0" z+=1 z 1 elif S[i]=="1":
        o+=1 S[i]=="1" S[i] S i "1" o+=1 o 1 print(2*min(z,o)) print 2*min(z,o) 2 min(z,o) min z o o=0 0 o o+=1 1 o z+=1 1 z S=input() input() S z=0 0 z
S=input()
z=0
o=0
for i in range(len(S)):
    if S[i]=="0":
        z+=1
    elif S[i]=="1":
        o+=1
print(2*min(z,o))