s=input()
s=list(s)

a=s.count('0')
b=s.count('1')

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

a=s.count('0')
b=s.count('1')

print(min(a,b)*2)
