#include <bits/stdc++.h>
using namespace std;
template <typename T>
T getint() {
  T x = 0, p = 1;
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') p = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * p;
}
mt19937 gen(chrono::system_clock::now().time_since_epoch().count());
template <typename T1, typename T2>
bool umin(T1 &x, const T2 &y) {
  if (x > y) return x = y, true;
  return false;
}
template <typename T1, typename T2>
bool umax(T1 &x, const T2 &y) {
  if (x < y) return x = y, true;
  return false;
}
const int maxn = (int)3e5 + 10;
const int inf = (int)1e9 + 5;
const int mod = (int)1e9 + 7;
const long long llinf = (long long)1e18 + 5;
const double pi = acos(-1.0);
int t[4 * maxn];
int pu[4 * maxn];
void push(int v) {
  t[v + v] += pu[v];
  pu[v + v] += pu[v];
  t[v + v + 1] += pu[v];
  pu[v + v + 1] += pu[v];
  pu[v] = 0;
}
void add(int v, int l, int r, int x, int tl, int tr) {
  if (l <= tl && tr <= r) {
    t[v] += x;
    pu[v] += x;
    return;
  }
  push(v);
  int tm = (tl + tr) / 2;
  if (l <= tm) add(v + v, l, r, x, tl, tm);
  if (r > tm) add(v + v + 1, l, r, x, tm + 1, tr);
  t[v] = min(t[v + v], t[v + v + 1]);
}
int a[maxn], b[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  int n, len, h;
  cin >> n >> len >> h;
  vector<int> x;
  for (int i = (0); i < (len); i++) {
    cin >> b[i];
    b[i] = h - b[i];
    x.push_back(b[i]);
  }
  for (int i = (0); i < (n); i++) {
    cin >> a[i];
    x.push_back(a[i]);
  }
  sort((x).begin(), (x).end());
  x.erase(unique((x).begin(), (x).end()), x.end());
  for (int i = (0); i < (len); i++)
    b[i] = lower_bound((x).begin(), (x).end(), b[i]) - x.begin();
  for (int i = (0); i < (n); i++)
    a[i] = lower_bound((x).begin(), (x).end(), a[i]) - x.begin();
  for (int i = (0); i < (len); i++) add(1, 0, b[i], -1, 0, maxn - 1);
  int res = 0;
  for (int i = (0); i < (n); i++) {
    add(1, 0, a[i], 1, 0, maxn - 1);
    if (i - len >= 0) add(1, 0, a[i - len], -1, 0, maxn - 1);
    if (i + 1 >= len && t[1] >= 0) res++;
  }
  cout << res << endl;
  return 0;
}
