s = input()
n = len(s)
ones = 0
for i in s:
  if i == '1':
    ones += 1
print(min(ones, n - ones) * 2) s = input() s input() input n = len(s) n len(s) len s ones = 0 ones 0 for i in s:
  if i == '1':
    ones += 1 i s if i == '1':
    ones += 1 i == '1' i '1' ones += 1 ones 1 print(min(ones, n - ones) * 2) print min(ones, n - ones) * 2 min(ones, n - ones) min ones n - ones n ones 2 n = len(s) len(s) n ones += 1 1 ones ones = 0 0 ones s = input() input() s
s = input()
n = len(s)
ones = 0
for i in s:
  if i == '1':
    ones += 1
print(min(ones, n - ones) * 2)