#include <bits/stdc++.h>
using namespace std;
long long a[200009], b[200009], h;
int n, len, id[200009];
pair<long long, int> p[200009];
int lb[200009];
int seg[1000009], lz[1000009], act[1000009];
void bld(int x, int l, int r) {
  if (l == r) {
    seg[x] = 1e9;
    return;
  }
  bld(2 * x + 1, l, (l + r) / 2);
  bld(2 * x + 2, (l + r) / 2 + 1, r);
  seg[x] = 1e9;
}
void laz(int x, int l, int r) {
  if (lz[x] == 0) return;
  if (l != r) {
    lz[2 * x + 1] += lz[x];
    lz[2 * x + 2] += lz[x];
  }
  seg[x] += lz[x];
  lz[x] = 0;
}
void add(int x, int l, int r, int w, int csum, int o) {
  laz(x, l, r);
  if (l == r) {
    w = p[w].second;
    if (o) {
      seg[x] = len - lb[w] - csum - 1;
      act[x] = 1;
    } else {
      act[x] = 0;
      seg[x] = 1e9;
    }
    return;
  }
  if (w <= (l + r) / 2)
    add(2 * x + 1, l, (l + r) / 2, w, csum, o);
  else
    add(2 * x + 2, (l + r) / 2 + 1, r, w, csum + act[2 * x + 1], o);
  laz(2 * x + 1, l, (l + r) / 2);
  laz(2 * x + 2, (l + r) / 2 + 1, r);
  seg[x] = min(seg[2 * x + 1], seg[2 * x + 2]);
  act[x] = act[2 * x + 1] + act[2 * x + 2];
}
void upd(int x, int l, int r, int b, int e, int v) {
  laz(x, l, r);
  if (b <= l && r <= e) {
    lz[x] = v;
    laz(x, l, r);
    return;
  }
  upd(2 * x + 2, (l + r) / 2 + 1, r, b, e, v);
  if ((l + r) / 2 >= b)
    upd(2 * x + 1, l, (l + r) / 2, b, e, v);
  else
    laz(2 * x + 1, l, (l + r) / 2);
  seg[x] = min(seg[2 * x + 1], seg[2 * x + 2]);
  act[x] = act[2 * x + 1] + act[2 * x + 2];
}
int rv[200009];
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(0);
  ios_base::sync_with_stdio(0);
  cin >> n >> len >> h;
  for (int i = 0; i < len; i++) {
    cin >> b[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    p[i] = {a[i], i};
  }
  sort(p, p + n);
  sort(b, b + len);
  for (int i = 0; i < n; i++) {
    id[p[i].second] = i;
  }
  b[len] = 1e9 + 9;
  for (int i = 0; i < n; i++) {
    int l = -1, r = len;
    while (r - l > 1) {
      if (b[(l + r) / 2] + a[i] >= h)
        r = (l + r) / 2;
      else
        l = (l + r) / 2;
    }
    lb[i] = r;
  }
  bld(0, 0, n);
  for (int i = 0; i < len; i++) {
    add(0, 0, n, id[i], 0, 1);
    upd(0, 0, n, id[i] + 1, n, -1);
  }
  int ans = 0;
  if (seg[0] >= 0) ans++;
  for (int i = len; i < n; i++) {
    add(0, 0, n, id[i - len], 0, 0);
    upd(0, 0, n, id[i - len] + 1, n, 1);
    add(0, 0, n, id[i], 0, 1);
    upd(0, 0, n, id[i] + 1, n, -1);
    if (seg[0] >= 0) ans++;
  }
  cout << ans;
}
