s = input()

a = 0
b = 0

for i in range(len(s)):
  if s[i] == "0":
    a += 1
  else:
    b += 1

print(min(a,b)*2) s = input() s input() input a = 0 a 0 b = 0 b 0 for i in range(len(s)):
  if s[i] == "0":
    a += 1
  else:
    b += 1 i range(len(s)) range len(s) len s if s[i] == "0":
    a += 1
  else:
    b += 1 s[i] == "0" s[i] s i "0" a += 1 a 1 b += 1 b 1 print(min(a,b)*2) print min(a,b)*2 min(a,b) min a b 2 b = 0 0 b b += 1 1 b a += 1 1 a s = input() input() s a = 0 0 a
s = input()

a = 0
b = 0

for i in range(len(s)):
  if s[i] == "0":
    a += 1
  else:
    b += 1

print(min(a,b)*2)