The first line contains a integer,(
), representing the number of boxes.
The second line containsintegers, where the
-th integer
(
) represents the value of
-th box.
The third line containsintegers, where the
-th integer
(
) represents whether
-box has a lid.
means there is no lid on the box.
An integer represents the answer.