An old planet called Alpha has been found but it is destructed completely. Archaeologists after expedition found out a map that depicts all the buildings that were in Alpha. In the map following facts were stated:
Now you have q queries.
Each query contains an integer k. For every query you have to print the count of buildings that can be made if you had infinite number of bricks of size k adhering to the above rules.
Constraints
1≤N≤105
1≤A[i]≤105
1≤q≤105
1≤K≤105
Input
First line contains a number N as input denoting the total number of buildings in the planet Alpha. Next N lines contain one integer each denoting the height of each of the buildings. Next line contains a number q as input that denotes the total queries to be asked. For each of the q queries next q lines contain an integer k each.
Output
Print the answer as per the description above for each query in a new line.
In the sample you can see that out of the given four buildings we can make the last 3 buildings using bricks of height 2.