There are rows in the theater, each containing seats. Two matrices are given. The first matrix contains the ticket prices. The second matrix indicates which tickets are sold and which are not ( means the ticket is sold, and means it is not).
Determine the total revenue from ticket sales.
The first line contains the integers and m~(n, m \le 500). Next comes the matrix of ticket prices — rows with integers each, every value being in the range from to . Then the matrix of sold tickets is given — rows with integers.
Print the total revenue from ticket sales.

Example 1