This page is still under construction.

Parts of this page are still being built. What you see may change.

Gift

Interview

Time limit2sMemory limit512 MB

Summary
Count the days on which the recorded time is at least k milliseconds faster than the previous day.
Level

Easy1 of 10

Topics
Array, Implementation
Solved
No attempts yet

Problem

The coach of Jacqueline Yo, an Olympic swimmer for Singapore, is worried about her butterfly stroke. He writes down her timing every day in milliseconds, where a millisecond is one thousandth of a second. He promised her a small gift as encouragement on every day she beats the previous day's timing by at least a fixed number of milliseconds.

Given the daily timings, find how many gifts Jacqueline received.

Input

The first line contains two integers nn and kk. nn (3≤n≤1003 \le n \le 100) is the number of days, and kk (0<k≤100,0000 < k \le 100{,}000) is the improvement the coach asks for, in milliseconds. Jacqueline receives a gift on every day her timing drops by at least kk milliseconds compared with the previous day. Each of the next nn lines contains one integer tt (0<t≤100,0000 < t \le 100{,}000), her timing for that day in milliseconds. The nn records are given in chronological order.

Output

Print a single integer, the number of gifts Jacqueline received.

Examples1

  1. Example 1

    Input
    6 100
    59420
    59410
    59310
    59290
    59470
    59350
    
    Expected output
    2