#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int arr[100100];
int A[23][100100];
int B[23][100100];
int C[100100];
int tree[100002 * 4];
void update(int node, int i, int j, int idx, int val) {
  if (idx < i || idx > j) return;
  if (idx >= i && idx <= j && i == j) {
    tree[node] = val;
    return;
  }
  int left = 2 * node;
  int right = left + 1;
  int mid = (i + j) / 2;
  update(left, i, mid, idx, val);
  update(right, mid + 1, j, idx, val);
  tree[node] = min(tree[left], tree[right]);
}
int query(int node, int i, int j, int a, int b) {
  if (i > j) return 999999;
  if (j < a || i > b) return 999999;
  if (i >= a && j <= b) {
    return tree[node];
  }
  int left = 2 * node;
  int right = left + 1;
  int mid = (i + j) / 2;
  int f1 = query(left, i, mid, a, b);
  int f2 = query(right, mid + 1, j, a, b);
  return min(f1, f2);
}
void calSparseTable() {
  int p = 1;
  for (int i = 1; i <= 20; i++) {
    for (int j = 1; j <= n; j++) {
      A[i][j] = A[i - 1][j];
      if (j + p <= n) A[i][j] = min(A[i][j], A[i - 1][j + p]);
    }
    for (int j = 1; j <= n; j++) {
      B[i][j] = B[i - 1][j];
      if (j + p <= n) B[i][j] = max(B[i][j], B[i - 1][j + p]);
    }
    p = p * 2;
  }
}
int getMin(int a, int b) {
  int c = b - a + 1;
  int idx = -1;
  while (c) {
    c = c / 2;
    idx++;
  }
  int val = pow(2, idx);
  return min(A[idx][a], A[idx][b - val + 1]);
}
int getMax(int a, int b) {
  int c = b - a + 1;
  int idx = -1;
  while (c) {
    c = c / 2;
    idx++;
  }
  int val = pow(2, idx);
  return max(B[idx][a], B[idx][b - val + 1]);
}
void preCal() {
  int last = 1;
  for (int i = 1; i <= n; i++) {
    last = max(last, i);
    while (last + 1 <= n) {
      int a = i;
      int b = last + 1;
      int mn = getMin(a, b);
      int mx = getMax(a, b);
      if (mx - mn <= m) {
        last++;
      } else
        break;
    }
    C[i] = last;
  }
}
int cal() {
  calSparseTable();
  preCal();
  update(1, 1, n + 1, n + 1, 0);
  for (int i = n; i >= n - k + 2; i--) {
    update(1, 1, n + 1, i, 999999);
  }
  for (int i = n - k + 1; i >= 1; i--) {
    int a = i + k;
    int b = C[i] + 1;
    int uu = query(1, 1, n + 1, a, b);
    if (uu != 999999) uu++;
    update(1, 1, n + 1, i, uu);
  }
  int vv = query(1, 1, n + 1, 1, 1);
  if (vv == 999999) return -1;
  return vv;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    A[0][i] = arr[i];
    B[0][i] = arr[i];
  }
  printf("%d\n", cal());
  return 0;
}
