S = list(input())

zero = S.count("0")
one = S.count("1")

print(min(zero, one) * 2) S = list(input()) S list(input()) list input() input zero = S.count("0") zero S.count("0") S.count S count "0" one = S.count("1") one S.count("1") S.count S count "1" print(min(zero, one) * 2) print min(zero, one) * 2 min(zero, one) min zero one 2 S = list(input()) list(input()) S one = S.count("1") S.count("1") one zero = S.count("0") S.count("0") zero
S = list(input())

zero = S.count("0")
one = S.count("1")

print(min(zero, one) * 2)