#include <bits/stdc++.h>
using namespace std;
const int MAXN = 15e4 + 5;
int n, m, ans = 0;
long long int a[MAXN], b[MAXN], mx[MAXN * 4], lazy[MAXN * 4], h;
void build(int b = 0, int e = m + 1, int ind = 1) {
  if (b + 1 == e) {
    mx[ind] = -b;
    return;
  }
  int mid = (b + e) / 2;
  build(b, mid, ind * 2);
  build(mid, e, ind * 2 + 1);
  mx[ind] = max(mx[ind * 2], mx[ind * 2 + 1]);
  return;
}
void add(long long int val, int l, int r, int b = 0, int e = m + 1,
         int ind = 1) {
  mx[ind] += lazy[ind];
  if (ind * 2 + 1 < MAXN * 4)
    lazy[ind * 2] += lazy[ind], lazy[ind * 2 + 1] += lazy[ind];
  lazy[ind] = 0;
  if (r <= b || e <= l) return;
  if (l <= b && r >= e) {
    mx[ind] += val;
    if (ind * 2 + 1 < MAXN) lazy[ind * 2] += val, lazy[ind * 2 + 1] += val;
    return;
  }
  int mid = (b + e) / 2;
  add(val, l, r, b, mid, ind * 2);
  add(val, l, r, mid, e, ind * 2 + 1);
  mx[ind] = max(mx[ind * 2], mx[ind * 2 + 1]);
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> h;
  for (int i = 0; i < m; i++) {
    cin >> b[i];
    b[i] = h - b[i];
  }
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(b, b + m);
  build();
  for (int i = 0; i < n; i++) {
    int ind = upper_bound(b, b + m, a[i]) - b;
    add(1, ind, m + 1);
    if (i >= m - 1) {
      if (mx[1] <= 0) ans++;
      int ind2 = upper_bound(b, b + m, a[i - m + 1]) - b;
      add(-1, ind2, m + 1);
    }
  }
  cout << ans << endl;
  return 0;
}
