s = input()
n0 = s.count("0")
n1 = s.count("1")
print(len(s) - abs(n0-n1)) s = input() s input() input n0 = s.count("0") n0 s.count("0") s.count s count "0" n1 = s.count("1") n1 s.count("1") s.count s count "1" print(len(s) - abs(n0-n1)) print len(s) - abs(n0-n1) len(s) len s abs(n0-n1) abs n0-n1 n0 n1 s = input() input() s n0 = s.count("0") s.count("0") n0 n1 = s.count("1") s.count("1") n1
s = input()
n0 = s.count("0")
n1 = s.count("1")
print(len(s) - abs(n0-n1))