s = input()
r = s.count("0")
b = s.count("1")
print(r + b - abs(r - b)) s = input() s input() input r = s.count("0") r s.count("0") s.count s count "0" b = s.count("1") b s.count("1") s.count s count "1" print(r + b - abs(r - b)) print r + b - abs(r - b) r + b r b abs(r - b) abs r - b r b b = s.count("1") s.count("1") b s = input() input() s r = s.count("0") s.count("0") r
s = input()
r = s.count("0")
b = s.count("1")
print(r + b - abs(r - b))