S=input()
zero=0
one=0
for i in range(len(S)):
    if S[i]=='1':
        one+=1
    else:
        zero+=1
print(min(zero,one)*2) S=input() S input() input zero=0 zero 0 one=0 one 0 for i in range(len(S)):
    if S[i]=='1':
        one+=1
    else:
        zero+=1 i range(len(S)) range len(S) len S if S[i]=='1':
        one+=1
    else:
        zero+=1 S[i]=='1' S[i] S i '1' one+=1 one 1 zero+=1 zero 1 print(min(zero,one)*2) print min(zero,one)*2 min(zero,one) min zero one 2 S=input() input() S one=0 0 one zero+=1 1 zero zero=0 0 zero one+=1 1 one
S=input()
zero=0
one=0
for i in range(len(S)):
    if S[i]=='1':
        one+=1
    else:
        zero+=1
print(min(zero,one)*2)
