s = input()
n = len(s)
a, b = 0, 0
for i in s:
  if i == '1':
    a+=1
b = n-a

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

print(min(a,b)*2)