s = input()

zero = 0
one = 0

for c in s:
    if c == '1':
        one +=1
    else :
        zero +=1

print(min(one,zero)*2) s = input() s input() input zero = 0 zero 0 one = 0 one 0 for c in s:
    if c == '1':
        one +=1
    else :
        zero +=1 c s if c == '1':
        one +=1
    else :
        zero +=1 c == '1' c '1' one +=1 one 1 zero +=1 zero 1 print(min(one,zero)*2) print min(one,zero)*2 min(one,zero) min one zero 2 zero +=1 1 zero s = input() input() s one = 0 0 one zero = 0 0 zero one +=1 1 one
s = input()

zero = 0
one = 0

for c in s:
    if c == '1':
        one +=1
    else :
        zero +=1

print(min(one,zero)*2)