S = list(map(int, input()))

A = S.count(0)
B = len(S) - A

print(min(A, B) * 2) S = list(map(int, input())) S list(map(int, input())) list map(int, input()) map int input() input A = S.count(0) A S.count(0) S.count S count 0 B = len(S) - A B len(S) - A len(S) len S A print(min(A, B) * 2) print min(A, B) * 2 min(A, B) min A B 2 S = list(map(int, input())) list(map(int, input())) S A = S.count(0) S.count(0) A B = len(S) - A len(S) - A B
S = list(map(int, input()))

A = S.count(0)
B = len(S) - A

print(min(A, B) * 2)