s = input()
one = s.count('1')
zero = s.count('0')

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

print(len(s) - abs(one - zero))
