S = input()
z = 0
o = 0
for c in S:
    if c == '0':
        z += 1
    else:
        o += 1
print(min([z,o])*2) S = input() S input() input z = 0 z 0 o = 0 o 0 for c in S:
    if c == '0':
        z += 1
    else:
        o += 1 c S if c == '0':
        z += 1
    else:
        o += 1 c == '0' c '0' z += 1 z 1 o += 1 o 1 print(min([z,o])*2) print min([z,o])*2 min([z,o]) min [z,o] z o 2 o += 1 1 o o = 0 0 o z = 0 0 z z += 1 1 z S = input() input() S
S = input()
z = 0
o = 0
for c in S:
    if c == '0':
        z += 1
    else:
        o += 1
print(min([z,o])*2)