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