S = input()
N = len(S)

L = abs(S.count('0') - S.count('1'))

print(N - L) S = input() S input() input N = len(S) N len(S) len S L = abs(S.count('0') - S.count('1')) L abs(S.count('0') - S.count('1')) abs S.count('0') - S.count('1') S.count('0') S.count S count '0' S.count('1') S.count S count '1' print(N - L) print N - L N L L = abs(S.count('0') - S.count('1')) abs(S.count('0') - S.count('1')) L S = input() input() S N = len(S) len(S) N
S = input()
N = len(S)

L = abs(S.count('0') - S.count('1'))

print(N - L)