Manao is solving a problem with the following statement:

<image>

He came up with a solution that produces the correct answers but is too slow. You are given the pseudocode of his solution, where the function getAnswer calculates the answer to the problem:
    
    
      
    getAnswer(a[1..n], b[1..len], h)  
      answer = 0  
      for i = 1 to n-len+1  
        answer = answer + f(a[i..i+len-1], b, h, 1)  
      return answer  
      
    f(s[1..len], b[1..len], h, index)  
      if index = len+1 then  
        return 1  
      for i = 1 to len  
        if s[index] + b[i] >= h  
          mem = b[i]  
          b[i] = 0  
          res = f(s, b, h, index + 1)  
          b[i] = mem  
          if res > 0  
            return 1  
      return 0  
    

Your task is to help Manao optimize his algorithm.

Input

The first line contains space-separated integers n, len and h (1 ≤ len ≤ n ≤ 150000; 1 ≤ h ≤ 109). The second line contains len space-separated integers b1, b2, ..., blen (1 ≤ bi ≤ 109). The third line contains n space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 109).

Output

Print a single number — the answer to Manao's problem.

Examples

Input

5 2 10
5 3
1 8 5 5 7


Output

2
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 150000 + 10, INF = 1 << 30;
struct Splay_tree {
  int l, r, fa, v, f, minf, add, size;
} t[MAXN], empty;
void Clean(int x) {
  if (!t[x].add) return;
  int u = t[x].add;
  t[x].f += u, t[x].minf += u;
  t[t[x].l].add += u, t[t[x].r].add += u;
  t[x].add = 0;
  t[0] = empty;
}
void Update(int x) {
  Clean(x);
  Clean(t[x].l), Clean(t[x].r);
  t[x].size = t[t[x].l].size + t[t[x].r].size + 1,
  t[x].minf = min(t[x].f, min(t[t[x].l].minf, t[t[x].r].minf));
  t[0] = empty;
}
void r_rotate(int x) {
  int l = t[x].l, fa = t[x].fa;
  Clean(fa), Clean(x), Clean(l);
  t[0] = empty;
  if (t[fa].l == x)
    t[fa].l = l;
  else
    t[fa].r = l;
  t[l].fa = fa;
  t[x].l = t[l].r, t[t[x].l].fa = x;
  t[x].fa = l, t[l].r = x;
  Update(x), Update(l);
  Update(fa);
}
void l_rotate(int x) {
  int r = t[x].r, fa = t[x].fa;
  Clean(fa);
  Clean(x), Clean(r);
  t[0] = empty;
  if (t[fa].r == x)
    t[fa].r = r;
  else
    t[fa].l = r;
  t[r].fa = fa;
  t[x].r = t[r].l, t[t[x].r].fa = x;
  t[x].fa = r, t[r].l = x;
  Update(x), Update(r);
  Update(fa);
}
int ROOT, tot;
void Splay(int x, int rootf) {
  empty.minf = empty.f = INF;
  t[0] = empty;
  while (t[x].fa != rootf) {
    int fa = t[x].fa, gr = t[fa].fa;
    if (gr == rootf)
      if (t[fa].l == x)
        r_rotate(fa);
      else
        l_rotate(fa);
    else if (t[gr].l == fa)
      if (t[fa].l == x)
        r_rotate(gr), r_rotate(fa);
      else
        l_rotate(fa), r_rotate(gr);
    else if (t[fa].r == x)
      l_rotate(gr), l_rotate(fa);
    else
      r_rotate(fa), l_rotate(gr);
  }
  if (rootf == 0) ROOT = x;
  Clean(ROOT);
}
void ini_Splay() {
  tot = 2;
  ROOT = 1;
  t[1].r = 2, t[2].fa = 1;
  t[1].v = -INF, t[2].v = INF;
  t[2].size = 1, t[1].size = 2;
  t[1].f = t[1].minf = t[2].f = t[2].minf = INF;
}
int Find1(int s) {
  int x = ROOT;
  for (; x; x = (s < t[x].v) ? t[x].l : t[x].r) {
    Clean(x);
    if (t[x].v == s) return x;
  }
  return x;
}
int Find(int k) {
  int x = ROOT;
  for (; x;) {
    Clean(x);
    if (t[t[x].l].size >= k) {
      x = t[x].l;
      continue;
    }
    k -= t[t[x].l].size;
    --k;
    if (!k) return x;
    x = t[x].r;
  }
  return x;
}
int idx;
int a[MAXN], b[MAXN], n, m, h;
void Print(int x) {
  Clean(x);
  if (t[x].l) Print(t[x].l);
  if (t[x].v > 0 && t[x].v < INF) {
    printf("%d %d ", t[x].v, t[x].f);
    ++idx;
  }
  if (t[x].r) Print(t[x].r);
  Update(x);
}
void Insert(int id) {
  int x = ROOT, pre = 0,
      p = m - (lower_bound(b + 1, b + m + 1, h - a[id]) - b) + 1;
  for (; x; Clean(x), pre = x, x = (a[id] < t[x].v) ? t[x].l : t[x].r)
    ;
  ++tot;
  if (a[id] < t[pre].v)
    t[pre].l = tot;
  else
    t[pre].r = tot;
  t[tot].fa = pre, t[tot].v = a[id];
  t[tot].f = INF;
  Splay(tot, 0);
  t[ROOT].f = p - (t[t[ROOT].l].size);
  Update(ROOT);
}
void init() {
  scanf("%d%d%d", &n, &m, &h);
  for (int i = 1; i <= m; ++i) scanf("%d", &b[i]);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  sort(b + 1, b + m + 1);
  ini_Splay();
  for (int i = 1; i <= m; ++i)
    Insert(i), --t[t[ROOT].r].add, Splay(t[ROOT].r, 0);
}
void solve() {
  int CC = (t[ROOT].minf >= 0);
  for (int i = m + 1; i <= n; ++i) {
    Splay(Find1(a[i - m]), 0);
    int k = t[t[ROOT].l].size + 1;
    Splay(Find(k - 1), 0);
    Splay(Find(k + 1), ROOT);
    t[t[t[ROOT].r].l].fa = 0;
    t[t[ROOT].r].l = 0;
    Update(t[ROOT].r);
    ++t[t[ROOT].r].add;
    Splay(t[ROOT].r, 0);
    Insert(i), --t[t[ROOT].r].add;
    Splay(t[ROOT].r, 0);
    CC += (t[ROOT].minf >= 0);
  }
  cout << CC << endl;
}
int main() {
  init();
  solve();
  fclose(stdin);
  fclose(stdout);
  return 0;
}
