ss = input()
zero = 0
one = 0
for s in ss:
    if s == "0":
        zero += 1
    elif s == "1":
        one += 1
print(2 * min(zero, one)) ss = input() ss input() input zero = 0 zero 0 one = 0 one 0 for s in ss:
    if s == "0":
        zero += 1
    elif s == "1":
        one += 1 s ss if s == "0":
        zero += 1
    elif s == "1":
        one += 1 s == "0" s "0" zero += 1 zero 1 elif s == "1":
        one += 1 s == "1" s "1" one += 1 one 1 print(2 * min(zero, one)) print 2 * min(zero, one) 2 min(zero, one) min zero one zero = 0 0 zero one = 0 0 one ss = input() input() ss zero += 1 1 zero one += 1 1 one
ss = input()
zero = 0
one = 0
for s in ss:
    if s == "0":
        zero += 1
    elif s == "1":
        one += 1
print(2 * min(zero, one))