#import int n,a,d,c,x,y,i=1;main(){for(std::cin>>n>>x;i>y;if(d-y+x)c=1,d=y-x;else c++;if(a