S = input()

ss = []
ans = 0
for i in range(len(S)): ss.append(S[i])

zeros = 0
ones = 0

for i in range(len(ss)):
    if ss[i] == "0":
        zeros += 1
    elif ss[i] == "1":
        ones += 1

ans = 2*min(zeros, ones)
print(ans) S = input() S input() input ss = [] ss [] ans = 0 ans 0 for i in range(len(S)): ss.append(S[i]) i range(len(S)) range len(S) len S zeros = 0 zeros 0 ones = 0 ones 0 for i in range(len(ss)):
    if ss[i] == "0":
        zeros += 1
    elif ss[i] == "1":
        ones += 1 i range(len(ss)) range len(ss) len ss if ss[i] == "0":
        zeros += 1
    elif ss[i] == "1":
        ones += 1 ss[i] == "0" ss[i] ss i "0" zeros += 1 zeros 1 elif ss[i] == "1":
        ones += 1 ss[i] == "1" ss[i] ss i "1" ones += 1 ones 1 ans = 2*min(zeros, ones) ans 2*min(zeros, ones) 2 min(zeros, ones) min zeros ones print(ans) print ans ans = 2*min(zeros, ones) 2*min(zeros, ones) ans S = input() input() S ss = [] [] ss zeros += 1 1 zeros ans = 0 0 ans zeros = 0 0 zeros ones = 0 0 ones ones += 1 1 ones
S = input()

ss = []
ans = 0
for i in range(len(S)): ss.append(S[i])

zeros = 0
ones = 0

for i in range(len(ss)):
    if ss[i] == "0":
        zeros += 1
    elif ss[i] == "1":
        ones += 1

ans = 2*min(zeros, ones)
print(ans)
