#include <bits/stdc++.h>
using namespace std;
const int Max = 2e5 + 10;
vector<int> A;
int ok[Max];
int len;
int seg[Max * 4];
int lazy[Max * 4];
void build(int tl = 0, int tr = len + 1, int idx = 1) {
  if (tr - tl == 1) {
    seg[idx] = len - tl;
    return;
  }
  int mid = (tl + tr) / 2;
  build(tl, mid, idx * 2);
  build(mid, tr, idx * 2 + 1);
  seg[idx] = min(seg[idx * 2], seg[idx * 2 + 1]);
}
void shift(int idx) {
  if (!lazy[idx]) return;
  lazy[idx * 2] += lazy[idx];
  lazy[idx * 2 + 1] += lazy[idx];
  seg[idx * 2] += lazy[idx];
  seg[idx * 2 + 1] += lazy[idx];
  lazy[idx] = 0;
}
void upd(int i, int val, int tl = 0, int tr = len + 1, int idx = 1) {
  if (tr - 1 <= i) {
    lazy[idx] += val;
    seg[idx] += val;
    return;
  }
  if (tl > i) return;
  shift(idx);
  int mid = (tl + tr) / 2;
  upd(i, val, tl, mid, idx * 2);
  upd(i, val, mid, tr, idx * 2 + 1);
  seg[idx] = min(seg[idx * 2], seg[idx * 2 + 1]);
}
int check() { return seg[1]; }
int main() {
  int n, h;
  cin >> n >> len >> h;
  for (int i = 0; i < len; i++) {
    int a;
    cin >> a;
    A.push_back(a);
  }
  sort(A.begin(), A.end());
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    int l = -1, r = len;
    while (r - l > 1) {
      int idx = (l + r) / 2;
      if (a + A[idx] >= h)
        r = idx;
      else
        l = idx;
    }
    ok[i] = r;
  }
  int ans = 0;
  build();
  for (int i = 0; i < len; i++) upd(ok[i], -1);
  if (check() >= 0) ans++;
  for (int i = len; i < n; i++) {
    upd(ok[i], -1);
    upd(ok[i - len], 1);
    if (check() >= 0) ans++;
  }
  cout << ans;
}
