s=input()
n=len(s)
r=0
b=0
for i in s:
    if i=="1":
        r+=1
    else:
        b+=1
print(min(r,b)*2) s=input() s input() input n=len(s) n len(s) len s r=0 r 0 b=0 b 0 for i in s:
    if i=="1":
        r+=1
    else:
        b+=1 i s if i=="1":
        r+=1
    else:
        b+=1 i=="1" i "1" r+=1 r 1 b+=1 b 1 print(min(r,b)*2) print min(r,b)*2 min(r,b) min r b 2 r=0 0 r s=input() input() s n=len(s) len(s) n b+=1 1 b b=0 0 b r+=1 1 r
s=input()
n=len(s)
r=0
b=0
for i in s:
    if i=="1":
        r+=1
    else:
        b+=1
print(min(r,b)*2)
