#include <bits/stdc++.h>
using namespace std;
const int MX = 2e5 + 10, MD = 1e9 + 7;
long long n, m, a[MX], ans, tmp, h, len, b[MX], mn[MX * 4], lazy[MX * 4];
void build(int id = 1, int s = 0, int e = len) {
  if (e - s == 1) {
    mn[id] = -s - 1;
    return;
  }
  int mid = (e + s) / 2;
  build(id * 2, s, mid);
  build(id * 2 + 1, mid, e);
  mn[id] = mn[id * 2 + 1];
}
void shift(int id) {
  if (!lazy[id]) return;
  long long val = lazy[id];
  lazy[id] = 0;
  lazy[id * 2] += val;
  lazy[id * 2 + 1] += val;
  mn[id * 2] += val;
  mn[id * 2 + 1] += val;
}
void upd(int l, int r, int val, int id = 1, int s = 0, int e = len) {
  if (s >= r || e <= l) return;
  if (s >= l && e <= r) {
    mn[id] += val;
    lazy[id] += val;
    return;
  }
  shift(id);
  int mid = (s + e) / 2;
  upd(l, r, val, id * 2, s, mid);
  upd(l, r, val, id * 2 + 1, mid, e);
  mn[id] = min(mn[id * 2], mn[id * 2 + 1]);
}
int main() {
  scanf("%d%d%d", &n, &len, &h);
  for (int i = 0; i < len; i++) scanf("%lld", &b[i]);
  sort(b, b + len);
  for (int i = 0; i < n; i++) scanf("%lld", &a[i]), a[i] = h - a[i];
  build();
  for (int i = 0; i < len; i++)
    tmp = lower_bound(b, b + len, a[i]) - b, upd(tmp, len, 1);
  if (mn[1] >= 0) ans++;
  for (int i = len; i < n; i++) {
    tmp = lower_bound(b, b + len, a[i]) - b;
    upd(tmp, len, 1);
    tmp = lower_bound(b, b + len, a[i - len]) - b;
    upd(tmp, len, -1);
    if (mn[1] >= 0) ans++;
  }
  printf("%lld", ans);
}
