S = input()

s0 = 0
s1 = 0
for i in S:
    if i == "0":
        s0 += 1
    elif i == "1":
        s1 += 1
    
print(min(s0, s1) * 2) S = input() S input() input s0 = 0 s0 0 s1 = 0 s1 0 for i in S:
    if i == "0":
        s0 += 1
    elif i == "1":
        s1 += 1
     i S if i == "0":
        s0 += 1
    elif i == "1":
        s1 += 1
     i == "0" i "0" s0 += 1 s0 1 elif i == "1":
        s1 += 1
     i == "1" i "1" s1 += 1 s1 1 print(min(s0, s1) * 2) print min(s0, s1) * 2 min(s0, s1) min s0 s1 2 S = input() input() S s1 += 1 1 s1 s0 = 0 0 s0 s0 += 1 1 s0 s1 = 0 0 s1
S = input()

s0 = 0
s1 = 0
for i in S:
    if i == "0":
        s0 += 1
    elif i == "1":
        s1 += 1
    
print(min(s0, s1) * 2)