Under construction

Still being built. Things may change

Sanghyeon's Physics and Experiment 1 Operation

Interview

Time limit1sMemory limit1024 MB

Summary
Given N densities and an error range E, count the groups of weights that link together when sorted neighbors differ by less than E.
Level

Easy3 of 10

Topics
Sorting, Array
Solved
No attempts yet

Problem

Sanghyeon is taking Physics and Experiment 1 and measured the densities of NN weights, all made of a single material. Each weight is numbered from 1 to NN, and the density of weight ii is DiD_i. He wants to use the densities to find how many different materials the NN weights are made of.

However, the density measurements are not exact. If the difference between the densities of two weights is less than the error range EE, he decides that the two weights are made of the same material. (For example, if the error range is 22, weights with densities 1010, 1111, 1212, 1313, 1414, and 1515 are all judged to be made of the same material.)

Input

The first line contains two integers NN (1≤N≤2×1051 \le N \le 2 \times 10^5) and EE (1≤E≤1091 \le E \le 10^9), separated by a space.

The second line contains NN integers D1,D2,⋯ ,DND_1, D_2, \cdots, D_N (1≤Di≤1091 \le D_i \le 10^9), separated by spaces.

Output

Print the number of materials that the NN weights are made of.

Examples1

  1. Example 1

    Input
    5 10
    5 29 18 9 35
    
    Expected output
    2