s = list(input())
p = s.count('0')
q = s.count('1')
print(2 * min(p,q)) s = list(input()) s list(input()) list input() input p = s.count('0') p s.count('0') s.count s count '0' q = s.count('1') q s.count('1') s.count s count '1' print(2 * min(p,q)) print 2 * min(p,q) 2 min(p,q) min p q q = s.count('1') s.count('1') q s = list(input()) list(input()) s p = s.count('0') s.count('0') p
s = list(input())
p = s.count('0')
q = s.count('1')
print(2 * min(p,q))