The prison of your city has *n* prisoners. As the prison can't accommodate all of them, the city mayor has decided to transfer *c* of the prisoners to a prison located in another city.

For this reason, he made the *n* prisoners to stand in a line, with a number written on their chests. The number is the severity of the crime he/she has committed. The greater the number, the more severe his/her crime was.

Then, the mayor told you to choose the *c* prisoners, who will be transferred to the other prison. He also imposed two conditions. They are,
 -  The chosen *c* prisoners has to form a contiguous segment of prisoners. -  Any of the chosen prisoner's crime level should not be greater then *t*. Because, that will make the prisoner a severe criminal and the mayor doesn't want to take the risk of his running away during the transfer. 
Find the number of ways you can choose the *c* prisoners.
The first line of input will contain three space separated integers *n* (1 ≤ *n* ≤ 2·10<sup class="upper-index">5</sup>), *t* (0 ≤ *t* ≤ 10<sup class="upper-index">9</sup>) and *c* (1 ≤ *c* ≤ *n*). The next line will contain *n* space separated integers, the *i*<sup class="upper-index">*th*</sup> integer is the severity *i*<sup class="upper-index">*th*</sup> prisoner's crime. The value of crime severities will be non-negative and will not exceed 10<sup class="upper-index">9</sup>.
"""
Input:
    n: number of prisoners.
    t: maximum number of crimes.
    c: number of crimes.
    
Conditions:
    - number of choosen prisoners should be segment of continues c
    - number of crimes(c) for each prison should be less than or equal maximum number of crimes(t)
    
Output:
    number of ways you can choose the c prisoners.
    
Solution:
    * Using two pointer
    1) We need to take every possible continues segments that have length of (c).
    2) Then, we need to get the summation of the segment.
    3) Finally, we check if each prison crime in segment less than or equal t.
    4) If true we increase the counter, else pass.

"""

n, t, c = list(map(int, input().split()))
prisoners_crimes: list[int] = list(map(int, input().split()))

counter = 0
    
left, right = 0, c-1
while (right < n):
    segment: list[int] = prisoners_crimes[left: right+1]
    if all(crime <= t for crime in segment):
        counter += 1
        
    left += 1
    right += 1
    
print(counter)