S=input()

R=0
B=0
for s in S:
    if s=="0":
        R+=1
    else:
        B+=1

print(2*min(R,B)) S=input() S input() input R=0 R 0 B=0 B 0 for s in S:
    if s=="0":
        R+=1
    else:
        B+=1 s S if s=="0":
        R+=1
    else:
        B+=1 s=="0" s "0" R+=1 R 1 B+=1 B 1 print(2*min(R,B)) print 2*min(R,B) 2 min(R,B) min R B R+=1 1 R B+=1 1 B S=input() input() S B=0 0 B R=0 0 R
S=input()

R=0
B=0
for s in S:
    if s=="0":
        R+=1
    else:
        B+=1

print(2*min(R,B))
