s=input()

l=list(s)

zeros = l.count('0')
ones = l.count('1')

if zeros<=ones:
    print(2*zeros)
else:
    print(2*ones) s=input() s input() input l=list(s) l list(s) list s zeros = l.count('0') zeros l.count('0') l.count l count '0' ones = l.count('1') ones l.count('1') l.count l count '1' if zeros<=ones:
    print(2*zeros)
else:
    print(2*ones) zeros<=ones zeros ones print(2*zeros) print 2*zeros 2 zeros print(2*ones) print 2*ones 2 ones s=input() input() s l=list(s) list(s) l ones = l.count('1') l.count('1') ones zeros = l.count('0') l.count('0') zeros
s=input()

l=list(s)

zeros = l.count('0')
ones = l.count('1')

if zeros<=ones:
    print(2*zeros)
else:
    print(2*ones)