S = list(input())
a = 0
b = 0
for s in S:
  if s == '0':
    a += 1
  else:
    b += 1
ans = min(a,b)
ans = ans * 2
print(ans) S = list(input()) S list(input()) list input() input a = 0 a 0 b = 0 b 0 for s in S:
  if s == '0':
    a += 1
  else:
    b += 1 s S if s == '0':
    a += 1
  else:
    b += 1 s == '0' s '0' a += 1 a 1 b += 1 b 1 ans = min(a,b) ans min(a,b) min a b ans = ans * 2 ans ans * 2 ans 2 print(ans) print ans b = 0 0 b ans = ans * 2 ans * 2 ans S = list(input()) list(input()) S a = 0 0 a ans = min(a,b) min(a,b) ans a += 1 1 a b += 1 1 b
S = list(input())
a = 0
b = 0
for s in S:
  if s == '0':
    a += 1
  else:
    b += 1
ans = min(a,b)
ans = ans * 2
print(ans)