You have a Petri dish with bacteria and you are preparing to dive into the harsh micro-world. But, unfortunately, you don't have any microscope nearby, so you can't watch them.

You know that you have $n$ bacteria in the Petri dish and size of the $i$-th bacteria is $a_i$. Also you know intergalactic positive integer constant $K$.

The $i$-th bacteria can swallow the $j$-th bacteria if and only if $a_i > a_j$ and $a_i \le a_j + K$. The $j$-th bacteria disappear, but the $i$-th bacteria doesn't change its size. The bacteria can perform multiple swallows. On each swallow operation any bacteria $i$ can swallow any bacteria $j$ if $a_i > a_j$ and $a_i \le a_j + K$. The swallow operations go one after another.

For example, the sequence of bacteria sizes $a=[101, 53, 42, 102, 101, 55, 54]$ and $K=1$. The one of possible sequences of swallows is: $[101, 53, 42, 102, \underline{101}, 55, 54]$ $\to$ $[101, \underline{53}, 42, 102, 55, 54]$ $\to$ $[\underline{101}, 42, 102, 55, 54]$ $\to$ $[42, 102, 55, \underline{54}]$ $\to$ $[42, 102, 55]$. In total there are $3$ bacteria remained in the Petri dish.

Since you don't have a microscope, you can only guess, what the minimal possible number of bacteria can remain in your Petri dish when you finally will find any microscope.


-----Input-----

The first line contains two space separated positive integers $n$ and $K$ ($1 \le n \le 2 \cdot 10^5$, $1 \le K \le 10^6$) — number of bacteria and intergalactic constant $K$.

The second line contains $n$ space separated integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^6$) — sizes of bacteria you have.


-----Output-----

Print the only integer — minimal possible number of bacteria can remain.


-----Examples-----
Input
7 1
101 53 42 102 101 55 54

Output
3

Input
6 5
20 15 10 15 20 25

Output
1

Input
7 1000000
1 1 1 1 1 1 1

Output
7



-----Note-----

The first example is clarified in the problem statement.

In the second example an optimal possible sequence of swallows is: $[20, 15, 10, 15, \underline{20}, 25]$ $\to$ $[20, 15, 10, \underline{15}, 25]$ $\to$ $[20, 15, \underline{10}, 25]$ $\to$ $[20, \underline{15}, 25]$ $\to$ $[\underline{20}, 25]$ $\to$ $[25]$.

In the third example no bacteria can swallow any other bacteria.

Difficulty: interview

Starter code:

Solutions:
n , k = input().split()

n , k = int(n), int(k)

d = {}

arr = list(map(int, input().split()))
for i in arr:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1;

arr = list(set(arr))
arr.sort()

cnt = 0
for i in range(len(arr)-1):
    if (arr[i] + k >= arr[i+1]):
        cnt += d[arr[i]]

print(n - cnt)


n, k = [int(x) for x in input().split()]

size = sorted([int(x) for x in input().split()])

from itertools import groupby
size = [(k, len(list(l))) for k, l in groupby(size)]

res = size[-1][-1]
for i in range(len(size) - 1):
    if size[i+1][0] > size[i][0] + k:
        res += size[i][1]

print(res)


import sys

n, K = list(map(int, sys.stdin.readline().split()))
a = sorted(list(map(int, sys.stdin.readline().split())))

eaten = set()
for i in range(1, n):
    x, y = a[i-1], a[i]
    if y > x and y <= x + K:
        eaten.add(x)

print(n - sum(x in eaten for x in a))


#     Educational Codeforces Round 45 (Rated for Div. 2)
import collections
from functools import cmp_to_key
#key=cmp_to_key(lambda x,y: 1 if x not in y else -1 )

import sys
def getIntList():
    return list(map(int, input().split()))    

 
            
    
n,K = getIntList()

z =  getIntList()
z.sort()


res = 0
last = -1
lastc = 0
for x in z:
    if x == last:
        lastc+=1
    elif last+K >= x:
        last = x
        lastc = 1
    else:
        res += lastc
        last = x
        lastc = 1

res += lastc

print(res)


import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n,k = LI()
    a = collections.Counter(LI())
    r = n
    ks = sorted(a.keys())
    for i in range(len(ks)-1):
        k1 = ks[i]
        k2 = ks[i+1]
        if k1 < k2 and k1 + k >= k2:
            r -= a[k1]

    return r


print(main())



def read():
    return int(input())


def readlist():
    return list(map(int, input().split()))


def readmap():
    return map(int, input().split())


N, K = readmap()
A = readlist()

A.sort()

count = 0
same = 1
for i in range(N-1):
    if A[i] == A[i+1]:
        same += 1
    elif A[i+1] <= A[i] + K:
        count += same
        same = 1
    else:
        same = 1

print(N - count)

from collections import Counter

n, K = list(map(int, input().split()))
a = list(map(int, input().split()))

a.sort()
C = Counter(a)

ans = n
s = sorted(C.keys())
for i, el in enumerate(s[1:]):
    if el - s[i] <= K:
        ans -= C[s[i]]

print(ans)


n, k = list(map(int, input().split()))
x = list(map(int, input().split()))
x.sort()
y = 0
d=0
for i in range(n-1):
    if x[i+1]>x[i] and x[i+1]<=x[i]+k:
        y+=1+d
        d=0
    if x[i+1]==x[i]:
        d+=1
    if x[i+1]!= x[i]:
        d=0
print(n-y)


n,k=(list(map(int,input().strip().split(' '))))
brr=list(map(int,input().strip().split(' ')))
arr=list(set(brr))
arr.sort(reverse=True)
n=len(arr)
for i in range(n-2,-1,-1):
  if(arr[i]<=arr[i+1]+k):
    arr[i+1]=-1
ans=[0 for i in range(1000001)]
for i in arr:
  if(i!=-1):
    ans[i]+=1
an=[]
for i in brr:
  if(ans[i]!=0):
    an.append(i)
print(len(an))



n, k = list( map(int, input().split()))

bact  = list( map(int, input().split()))
bact.sort()
res = 0
live = 1
for i in range(n-1):
    if bact[i+1] == bact[i]: # cannot consume
        live += 1
    elif bact[i+1] - bact[i] > k: # all unconsumed survived
        res += live
        live = 1
    else:
        live = 1 # current is alive, others eaten

res += live

print(res)

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort(reverse=True)

ans = 1
i = 1
while i < len(a):
	if a[i - 1] > a[i]:
		while i < len(a) and a[i] + k >= a[i - 1]:
			i += 1
	i += 1
	if i - 1 < len(a):
		ans += 1

print(ans)

#!/usr/bin/env python3

[n, K] = list(map(int, input().strip().split()))
ais = list(map(int, input().strip().split()))

ais.sort()
res = 0
cnt = 1
for i in range(n - 1):
	if ais[i + 1] == ais[i]:
		cnt += 1
	else:
		if ais[i + 1] > ais[i] + K:
			res += cnt
		cnt = 1

res += cnt
print (res)


n,k = list(map(int,input().split()))
ai = list(map(int,input().split()))
ai.sort()
last = ai[n-1]
ans = 1
lastAlive = ai[n-1]
for i in range(n-2,-1,-1):
    if last - k > ai[i] or lastAlive == ai[i]:
        ans += 1
        lastAlive = ai[i]
    last = ai[i]
print(ans)


s = input()
n, K = list(map(int, s.split()))

s = input()
a = list(map(int, s.split()))

a = sorted(a)

c = 0
l = 0
r = 1

while r < len(a):
    if a[r] == a[l]:
        r += 1
    else:
        if a[l] + K >= a[r]:
            c += (r - l)
        l = r
        r += 1

print(len(a) - c)

n , k = list(map(int, input().split()))
data =  list(map(int,input().split()))

data.sort()
data = data[::-1]
ans = 1

prev = data[0]

for i in range(1, n):
    if not ( data[i] != prev and  data[i] + k >= prev):
        ans +=1

    if i < n - 1 and data[i] == data[i + 1]:
        prev = prev
    else:
        prev = data[i]
 
print(ans)
    


size, k = input().split()
size = int(size)
k = int(k)

nums = input().split()
nums = [int(i) for i in nums]

occurances={i:0 for i in nums}
for num in nums:
    occurances[num]+=1

ans = []
nums = sorted(occurances.keys())
for i in range(len(nums)-1):
    if not (nums[i]<nums[i+1] and nums[i]+k>=nums[i+1]):
        ans.append(nums[i])

ans.append(nums[-1])
ans_num=0
for i in ans:
    ans_num += occurances[i]

print(ans_num)


n, k = list(map(int, input().split()))
last = 10000000
res = 0
cur_res = 1
for cur in sorted(list(map(int, input().split()))):
	if cur == last:
		cur_res += 1
	else:
		if cur > last+k:
			res += cur_res
		cur_res = 1
	last = cur
res += cur_res
print(res)


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import time

(n, K) = (int(i) for i in input().split())
a   = [int(i) for i in input().split()]

start = time.time()

a.sort()
ans = n

flag = 1
for i in range(1, n):
    if a[i-1] == a[i]:
        flag +=1
    elif a[i] <= a[i-1]+K:
        ans -=flag;
        flag = 1
    else:
        flag = 1

print(ans)
finish = time.time()
#print(finish - start)


n,k=list(map(int,input().strip().split()))
l=list(map(int,input().strip().split()))
i=0
j=1
l.sort()
le=len(l)
deletion=0
valid=[0 for i in range(le)]
while(j<le and i<le):
	if (valid[i]==1):
		i=i+1
		continue
	elif (i==j):
		j=j+1
		continue
	elif (l[i]<l[j] and l[j]<=(l[i]+k)):
		deletion=deletion+1
		valid[i]=1
		i=i+1
	elif (l[i]==l[j]):
		j=j+1
		continue
	else:
		i=i+1
print(le-deletion)


#!/usr/bin/env python3
from sys import stdin, stdout

def rint():
    return list(map(int, stdin.readline().split()))
#lines = stdin.readlines()


n, K = rint()

a = list(rint())

a.sort()
#print(K)
#print(a)

cnt = 0
cnt_same = 1
for i in range(n-1):
    if a[i+1] == a[i]:
        cnt_same += 1
        continue
    if a[i+1] - a[i] <= K:
        cnt_same = 1
        continue
    else:
        cnt += cnt_same
        cnt_same = 1

#print(cnt, cnt_same)
print(cnt+ cnt_same)




def ii():
    return int(input())
def mi():
    return map(int, input().split())
def li():
    return list(mi())

n, k = mi()
a = li()
a.sort()
ans = 0
i = 0
while i < len(a):
    j = i + 1
    c = 1
    while j < len(a) and a[j] <= a[j - 1] + k:
        if a[j] == a[j - 1]:
            c += 1
        else:
            c = 1
        j += 1
    ans += c
    i = j
print(ans)

n, K = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
k = len(a)

i = 0
while i < len(a):
    if a[i] == a[-1]:
        break
    j = i+1
    while a[i] == a[j]:
        j += 1
    if a[i] + K >= a[j]:
        k -= j - i
    i = j

print(k)

n, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
a.sort()
ans = n
c = 1
for i in range(0, n-1):
    if a[i] == a[i+1]:
        c += 1
    elif (a[i]+k >= a[i+1]):
        ans -= c
        c = 1
    else:
        c = 1
print(ans)


n, K = [int(i) for i in input().split()]

a = input().split()
for i in range(n):
	a[i] = int(a[i])

a.sort()

i = 0
j = 1
ans = n

while True:
	if j == n:
		break
	if a[j] == a[i]:
		j += 1
	else:
		if a[i] + K >= a[j]:
			ans -= 1
			i += 1
		else:
			i += 1

print(ans)