S = input()
bl = 0
re = 0
for i in S:
  if i == "0":
    re += 1
  else:
    bl += 1
print(min(bl,re)*2) S = input() S input() input bl = 0 bl 0 re = 0 re 0 for i in S:
  if i == "0":
    re += 1
  else:
    bl += 1 i S if i == "0":
    re += 1
  else:
    bl += 1 i == "0" i "0" re += 1 re 1 bl += 1 bl 1 print(min(bl,re)*2) print min(bl,re)*2 min(bl,re) min bl re 2 S = input() input() S bl += 1 1 bl bl = 0 0 bl re += 1 1 re re = 0 0 re
S = input()
bl = 0
re = 0
for i in S:
  if i == "0":
    re += 1
  else:
    bl += 1
print(min(bl,re)*2)