s=input()

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

if a>=b:
    print(b*2)

else:
    print(a*2) s=input() s input() input 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' if a>=b:
    print(b*2)

else:
    print(a*2) a>=b a b print(b*2) print b*2 b 2 print(a*2) print a*2 a 2 s=input() input() s a=s.count('0') s.count('0') a b=s.count('1') s.count('1') b
s=input()

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

if a>=b:
    print(b*2)

else:
    print(a*2)