from collections import Counter

d={chr(i):0 for i in range(2)}

s=Counter(eval(input()))

d=d.update(s)

print((min(s["0"],s["1"])*2))
s=eval(input())

print((min(s.count("0"),s.count("1"))*2))
from collections import Counter

d = {chr(i): 0 for i in range(2)}
s = Counter(eval(input()))
d = d.update(s)
print((min(s["0"], s["1"]) * 2))

s = eval(input())
print((min(s.count("0"), s.count("1")) * 2))

-from collections import Counter - -d = {chr(i): 0 for i in range(2)} -s = Counter(eval(input())) -d = d.update(s) -print((min(s["0"], s["1"]) * 2)) +s = eval(input()) +print((min(s.count("0"), s.count("1")) * 2))