s=input()
zero = s.count("0")
one = s.count("1")
print(len(s)-abs(zero-one)) s=input() s input() input zero = s.count("0") zero s.count("0") s.count s count "0" one = s.count("1") one s.count("1") s.count s count "1" print(len(s)-abs(zero-one)) print len(s)-abs(zero-one) len(s) len s abs(zero-one) abs zero-one zero one one = s.count("1") s.count("1") one zero = s.count("0") s.count("0") zero s=input() input() s
s=input()
zero = s.count("0")
one = s.count("1")
print(len(s)-abs(zero-one))