#include <cstdio>
#include <iostream>
#define ri register int
using namespace std;

const int N = 2e5 + 50;

int n, v, m;
int a[N], f[N], g[N];
int lb[N], rb[N], ans[N];
int pre[1 << 18 | 5][18], nxt[1 << 18 | 5][18];

int main() {
  scanf("%d%d", &n, &v);
  for (int i = 1; i <= n; i ++) scanf("%d", &a[i]);
  for (int t = v; t; t >>= 1) m ++;
  for (int j = 0; j < m; j ++)
    nxt[n + 1][j] = n + 1;
  lb[0] = 1; rb[n + 1] = n;
  for (ri i = 1; i <= n; i ++) {
    lb[i] = (a[i] - a[i - 1] > v) ? i : lb[i - 1];
    for (ri j = 1; j < m; j ++)
      pre[i][j] = ((a[i] - a[i - 1]) > (v >> j)) ? i - 1 : pre[i - 1][j];
  }
  for (ri i = n; i; i --) {
    rb[i] = (a[i + 1] - a[i] > v) ? i : rb[i + 1];
    for (ri j = 1; j < m; j ++)
      nxt[i][j] = ((a[i + 1] - a[i]) > (v >> j)) ? i + 1 : nxt[i + 1][j];
  }
  for (ri i = 0, l, r; i < (1 << m); i += 2) {
    l = 1; r = n;
    for (ri j = 1; j < m; j ++)
      if ((i >> j) & 1) {
	l = max(l, nxt[f[i ^ (1 << j)]][j]);
	r = min(r, pre[g[i ^ (1 << j)]][j]);
      }
    f[i] = l; g[i] = r;
  }
  int U = 
  for (ri i = 0; i < (1 << m); i += 2) {
    
  }
  return 0;
}
