a=eval(input())

one=0

zero=0

for i in a:

  if i=="0":

    zero+=1

  else:

    one+=1



print((2*min(zero,one)))
S = eval(input())

 

red = S.count('0')

blue = S.count('1')

 

print((min(red, blue)*2))
a = eval(input())
one = 0
zero = 0
for i in a:
    if i == "0":
        zero += 1
    else:
        one += 1
print((2 * min(zero, one)))

S = eval(input())
red = S.count("0")
blue = S.count("1")
print((min(red, blue) * 2))

-a = eval(input()) -one = 0 -zero = 0 -for i in a: -    if i == "0": -        zero += 1 -    else: -        one += 1 -print((2 * min(zero, one))) +S = eval(input()) +red = S.count("0") +blue = S.count("1") +print((min(red, blue) * 2))