S = input()

zero_count = int(S.count('0'))
one_count = int(S.count('1'))

print(min(zero_count, one_count)*2) S = input() S input() input zero_count = int(S.count('0')) zero_count int(S.count('0')) int S.count('0') S.count S count '0' one_count = int(S.count('1')) one_count int(S.count('1')) int S.count('1') S.count S count '1' print(min(zero_count, one_count)*2) print min(zero_count, one_count)*2 min(zero_count, one_count) min zero_count one_count 2 S = input() input() S one_count = int(S.count('1')) int(S.count('1')) one_count zero_count = int(S.count('0')) int(S.count('0')) zero_count
S = input()

zero_count = int(S.count('0'))
one_count = int(S.count('1'))

print(min(zero_count, one_count)*2)
