S = input()
z = S.count("0")
o = S.count("1")

print(len(S)-abs(z-o)) S = input() S input() input z = S.count("0") z S.count("0") S.count S count "0" o = S.count("1") o S.count("1") S.count S count "1" print(len(S)-abs(z-o)) print len(S)-abs(z-o) len(S) len S abs(z-o) abs z-o z o S = input() input() S o = S.count("1") S.count("1") o z = S.count("0") S.count("0") z
S = input()
z = S.count("0")
o = S.count("1")

print(len(S)-abs(z-o))