s = input()

z = 0
o = 0
for c in s:
    if c == '1':
        o += 1
    else:
        z += 1

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

z = 0
o = 0
for c in s:
    if c == '1':
        o += 1
    else:
        z += 1

print(min(o, z) * 2)
