#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 1e5 + 1e4 + 10;
const int M = 1e6 + 10;
const int inf = 2e9;
const long long linf = 1e18;
int seg[4 * N], lzy[4 * N];
void propagate(int node, int l, int r) {
  if (lzy[node] && l < r) {
    lzy[2 * node] += lzy[node];
    lzy[2 * node + 1] += lzy[node];
  }
  if (lzy[node]) {
    seg[node] += lzy[node];
    lzy[node] = 0;
  }
}
void update(int node, int ss, int se, int qs, int qe, int val) {
  propagate(node, ss, se);
  if (se < qs || qe < ss || qs > qe) return;
  if (qs <= ss && se <= qe) {
    lzy[node] += val;
    propagate(node, ss, se);
    return;
  }
  int mid = ss + se >> 1;
  update(2 * node, ss, mid, qs, qe, val);
  update(2 * node + 1, mid + 1, se, qs, qe, val);
  seg[node] = min(seg[2 * node], seg[2 * node + 1]);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int m, n, h;
  cin >> n >> m >> h;
  vector<int> b(m), a(n);
  for (int i = 0; i < m; i++) {
    cin >> b[i];
  }
  sort(b.begin(), b.end());
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    int l = 0, r = m - 1, ans = m;
    while (l <= r) {
      int mid = l + r >> 1;
      if (a[i] + b[mid] >= h)
        ans = mid, r = mid - 1;
      else
        l = mid + 1;
    }
    a[i] = ans;
  }
  for (int i = 0; i < m; i++) update(1, 0, m - 1, i, i, -i - 1);
  for (int i = 0; i < m - 1; i++) update(1, 0, m - 1, a[i], m - 1, 1);
  int ans = 0;
  for (int i = m - 1; i < n; i++) {
    update(1, 0, m - 1, a[i], m - 1, 1);
    ans += seg[1] >= 0;
    update(1, 0, m - 1, a[i - m + 1], m - 1, -1);
  }
  cout << ans << '\n';
  return 0;
}
