S = input()

zeros = 0
ones = 0

for char in S:
  if char == '0':
    zeros += 1
  else:
    ones += 1
    
print(min(zeros, ones) * 2) S = input() S input() input zeros = 0 zeros 0 ones = 0 ones 0 for char in S:
  if char == '0':
    zeros += 1
  else:
    ones += 1
     char S if char == '0':
    zeros += 1
  else:
    ones += 1
     char == '0' char '0' zeros += 1 zeros 1 ones += 1 ones 1 print(min(zeros, ones) * 2) print min(zeros, ones) * 2 min(zeros, ones) min zeros ones 2 zeros = 0 0 zeros S = input() input() S ones = 0 0 ones zeros += 1 1 zeros ones += 1 1 ones
S = input()

zeros = 0
ones = 0

for char in S:
  if char == '0':
    zeros += 1
  else:
    ones += 1
    
print(min(zeros, ones) * 2)