#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int x;
  scanf("%d", &x);
  return x;
}
const int N = 1e6 + 10;
const int MOD = 1e9 + 7;
const long double eps = 1e-12;
int seg[4 * N], n, len, h, a[N], b[N], lazy[4 * N];
void shift(int idx) {
  lazy[idx * 2 + 0] += lazy[idx];
  lazy[idx * 2 + 1] += lazy[idx];
  seg[idx * 2 + 0] += lazy[idx];
  seg[idx * 2 + 1] += lazy[idx];
  lazy[idx] = 0;
}
void update(int ql, int qr, int val, int l = 0, int r = len, int idx = 1) {
  if (qr <= l || r <= ql) return;
  if (ql <= l && r <= qr) {
    lazy[idx] += val;
    seg[idx] += val;
    return;
  }
  shift(idx);
  int mid = (l + r) / 2;
  update(ql, qr, val, l, mid, idx * 2 + 0);
  update(ql, qr, val, mid, r, idx * 2 + 1);
  seg[idx] = min(seg[idx * 2 + 0], seg[idx * 2 + 1]);
}
int main() {
  n = in();
  len = in();
  h = in();
  for (int i = 0; i < len; i++) b[i] = in();
  for (int i = 0; i < n; i++) a[i] = in();
  sort(b, b + len);
  for (int i = 0; i < n; i++) a[i] = int(lower_bound(b, b + len, h - a[i]) - b);
  for (int i = 0; i < len; i++) update(i, i + 1, -i - 1);
  for (int i = 0; i < len - 1; i++) update(a[i], len, +1);
  int ans = 0;
  for (int i = len - 1; i < n; i++) {
    update(a[i], len, +1);
    if (seg[1] >= 0) ans++;
    update(a[i - len + 1], len, -1);
  }
  cout << ans;
  return 0;
}
