/
実行時間制限: 2 sec / メモリ制限: 1024 MiB
配点 : 100 点
問題文
AtCoder 国では馬のレースが N 個開催されています。
i 個目のレースには A_i 歳以下の馬が出場できます。
N 個のレースのうち、 K 歳の馬が出場できるレースの個数はいくつですか?
制約
- 入力は全て整数
- 1 \le N \le 100
- 1 \le A_i \le 100
- 1 \le K \le 100
入力
入力は以下の形式で標準入力から与えられる。
N A_1 A_2 \dots A_N K
出力
答えを整数として出力せよ。
入力例 1
5 3 1 4 1 5 4
出力例 1
2
- 1 個目のレースには 3 歳以下の馬が出場できます。
- 2 個目のレースには 1 歳以下の馬が出場できます。
- 3 個目のレースには 4 歳以下の馬が出場できます。
- 4 個目のレースには 1 歳以下の馬が出場できます。
- 5 個目のレースには 5 歳以下の馬が出場できます。
5 個のレースのうち、 4 歳の馬が出場できるものは 3,5 個目の 2 つです。
入力例 2
1 1 100
出力例 2
0
K 歳の馬が出場できるレースがひとつもない場合もあります。
入力例 3
15 18 89 31 2 15 93 64 78 58 19 79 59 24 50 30 38
出力例 3
8
Score : 100 points
Problem Statement
In AtCoder Kingdom, there are N horse races being held.
Horses aged A_i or younger can participate in the i-th race.
Among the N races, how many races can a K-year-old horse participate in?
Constraints
- All input values are integers.
- 1 \le N \le 100
- 1 \le A_i \le 100
- 1 \le K \le 100
Input
The input is given from Standard Input in the following format:
N A_1 A_2 \dots A_N K
Output
Output the answer as an integer.
Sample Input 1
5 3 1 4 1 5 4
Sample Output 1
2
- Horses aged 3 or younger can participate in the 1st race.
- Horses aged 1 or 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.
Sample Input 2
1 1 100
Sample Output 2
0
There may be no races that a K-year-old horse can participate in.
Sample Input 3
15 18 89 31 2 15 93 64 78 58 19 79 59 24 50 30 38
Sample Output 3
8