There are more test cases. Each case starts with a line containing five integers L, S, M, D, B
N (1 ≤ L ≤ 108, 1 ≤ S, M, D, B ≤ 5 000) representing (in this order) the lunch price upper
limit, the number of soups, the number of main dishes, the number of desserts and the number
of beverages in the cantine. Each of the next four lines contains a list of prices. The first line
contains the soups price list, the second line contains the main dishes price list, the third line
contains the desserts price list, and the fourth line contains the beverages price list. All items
in all lists are positive integers not exceeding 108. There is one empty line after each test case.
The input is terminated by a line with five zeros.
For each test case print on a separate line the number of different lunches which can be assembled
from the cantine offer and have price not exceeding L. Please note that the value of the solution
might not fit into 32-bit integer.