e-olymp
Problems

Sort by growth

Sort by growth

prb3607

At the opening ceremony of the Olympics games, as well as at its closing ceremony, the athletes of each country wore the same costumes. Naturally, with so many athletes, coaches and support staff, the process of sewing the Olympic parade uniform for many countries was quite responsible and important, and it is necessary to know the growth of each member in delegation to sew the uniform of appropriate size. The companies that will be engaged in tailoring this uniform are partly lucky, since it is known that none of the members in delegation is shorter than one and a half meters and above two and a half meters.

You have a database with the growth of each member in delegation for the respective kind of sport. Your task is to answer quickly to the queries of next type: how many members in delegation have height in the range from a to b centimeters?

Input

The first line of each query contains one number n (1n20000) - the number of members in corresponding delegation. The second line contains n integers - the heights of athletes in centimeters. The data are not sorted because were placed in a database at the last moment, and therefore were not processed. The third line contains a query: 2 number - the lower and upper limits of growth, in which the manufacturer is interested.

Output

For each query print the answer on a separate line.

Time limit 3 seconds
Memory limit 128 MiB
Input example #1
7
153 168 155 167 155 167 155
165 170
6
189 191 169 190 192 191
165 172
Output example #1
3
1
Source II Открытая Дистанционная Олимпиада 2012-2013 им. В.Л.Дидковского