#include <bits/stdc++.h>
using namespace std;
const int N = 15e4 + 4;
int n, m, a[N], b[N], t[4 * N], laz[4 * N], ans, h;
void update(int n, int b, int e, int u, int k) {
  if (u < b) return;
  if (e <= u) {
    laz[n] += k;
    return;
  }
  int l = n << 1, r = l | 1, m = b + e >> 1;
  update(l, b, m, u, k);
  update(r, m + 1, e, u, k);
  t[n] = max(t[l] + laz[l], t[r] + laz[r]);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> h;
  for (int i = 0; i < m; i++) cin >> b[i];
  sort(b, b + m);
  for (int i = 0, tmp; i < n; i++) {
    cin >> tmp;
    a[i] = lower_bound(b, b + m, h - tmp) - b;
  }
  update(1, 0, m, m, m);
  for (int i = 0; i < m; i++) update(1, 0, m, i, -1);
  for (int i = 0; i < m - 1; i++) update(1, 0, m, a[i], 1);
  for (int i = m - 1; i < n; i++) {
    update(1, 0, m, a[i], 1);
    if (t[1] + laz[1] <= m) ans++;
    update(1, 0, m, a[i - m + 1], -1);
  }
  cout << ans << '\n';
  return 0;
}
