Room Painting

Time limit1sMemory limit128 MB

Problem

Joe's landlord has allowed him to paint his room in any colours he likes, even several colours at once, and Joe has designed something very colourful. Now he needs to buy the paint. As a struggling student, Joe does not want to waste any money, so he has computed exactly how much of each colour he needs, down to the microlitre. The local paint shop, however, will not sell him a can of, say, exactly 3.141592 litres of red paint: it stocks only a fixed set of can sizes. Joe therefore has to buy slightly more paint than he needs, but he wants to waste as little as possible. He also refuses to buy more than one can of any single colour.

For each colour, Joe buys exactly one can, and that can must hold at least as much paint as he needs for the colour. To waste the least paint on a colour, he chooses the smallest available can that still satisfies that colour's requirement. Compute the total amount of paint wasted.

Input

The first line contains two integers $n$ and $m$ ($0 < n \le 100000$, $0 < m \le 100000$): the number of can sizes offered by the shop and the number of colours Joe needs.

Each of the next $n$ lines contains the size, in microlitres, of one can offered by the shop. Each can holds at most $1000$ litres.

Each of the following $m$ lines contains the number of microlitres Joe needs of one colour. For every colour it is guaranteed that the shop sells a can large enough to satisfy that colour's requirement.

Output

Print a single line containing the total number of microlitres of paint wasted, assuming that for each colour Joe buys the smallest can that still satisfies that colour's requirement.