#3317. horse races
horse races
Description
In AtCoder Kingdom, there are N horse races being held. Horses aged Ai or younger can participate in the i-th race. Among the N races, how many races can a K-year-old horse participate in?
Format
Input
All input values are integers. 1≤N≤100 1≤Ai≤100 1≤K≤100
The input is given from Standard Input in the following format:
N
A1 A2 … AN
K
Output
Output the answer as an integer.
Samples
5
3 1 4 1 5
4
2
1
1
100
0
15
18 89 31 2 15 93 64 78 58 19 79 59 24 50 30
38
8
Sample1 explanation
Horses aged 3 or younger can participate in the 1st race.
Horses aged 1or younger can participate in the 2nd race.
Horses aged 4 or younger can participate in the 3rd race.
Horses aged 1 or younger can participate in the 4th race.
Horses aged 5 or younger can participate in the 5th race.
Among the 5 races, a 4-year-old horse can participate in the 3rd and 5th races, which is 2 races.
Sample2 explanation
There may be no races that a K-year-old horse can participate in.
Limitation
Time Limit: 2 sec / Memory Limit: 1024 MiB