s=input()
n=len(s)
t=0
for i in range(n):
    if s[i]=="1":
        t+=1
print(min(2*t,2*(n-t))) s=input() s input() input n=len(s) n len(s) len s t=0 t 0 for i in range(n):
    if s[i]=="1":
        t+=1 i range(n) range n if s[i]=="1":
        t+=1 s[i]=="1" s[i] s i "1" t+=1 t 1 print(min(2*t,2*(n-t))) print min(2*t,2*(n-t)) min 2*t 2 t 2*(n-t) 2 n-t n t s=input() input() s t=0 0 t n=len(s) len(s) n t+=1 1 t
s=input()
n=len(s)
t=0
for i in range(n):
    if s[i]=="1":
        t+=1
print(min(2*t,2*(n-t)))