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;
inline int read() {
  static int r, sign;
  static char c;
  r = 0, c = getchar(), sign = 1;
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') sign = -1, c = getchar();
  while (c >= '0' && c <= '9') r = r * 10 + (c - '0'), c = getchar();
  return r * sign;
}
template <typename T>
inline void print(T *a, int n) {
  for (int i = 1; i < n; ++i) cout << a[i] << " ";
  cout << a[n] << endl;
}
inline int min(int x, int y) { return x < y ? x : y; }
class Node {
 public:
  Node *l, *r, *f;
  int p, v, d, m, s;
  Node() {}
  Node(int _p, int _v) {
    p = _p, v = m = _v, d = 0, s = 1;
    l = r = f = NULL;
  }
} * root;
inline void apply(Node *x, int d) { x->d += d, x->m += d, x->v += d; }
inline void push(Node *x) {
  if (x->d != 0) {
    if (x->l) apply(x->l, x->d);
    if (x->r) apply(x->r, x->d);
    x->d = 0;
  }
}
inline void update(Node *x) {
  x->m = min(x->v, min(x->l ? x->l->m : INT_MAX, x->r ? x->r->m : INT_MAX));
  x->s = 1 + (x->l ? x->l->s : 0) + (x->r ? x->r->s : 0);
}
inline void zig(Node *x) {
  static Node *y, *z;
  y = x->f, z = y->f;
  push(x);
  if (z && z->l == y)
    z->l = x;
  else if (z && z->r == y)
    z->r = x;
  if (x->r) x->r->f = y;
  y->l = x->r;
  x->r = y, y->f = x, x->f = z;
  update(y);
}
inline void zag(Node *x) {
  static Node *y, *z;
  y = x->f, z = y->f;
  push(x);
  if (z && z->l == y)
    z->l = x;
  else if (z && z->r == y)
    z->r = x;
  if (x->l) x->l->f = y;
  y->r = x->l;
  x->l = y, y->f = x, x->f = z;
  update(y);
}
inline void splay(Node *x, Node **r) {
  static Node *y, *z, *f;
  f = (*r)->f;
  while (x->f != f) {
    y = x->f, z = y->f;
    if (z != f) push(z);
    push(y);
    if (z == f) {
      if (x == y->l)
        zig(x);
      else
        zag(x);
    } else {
      if (y == z->l) {
        if (x == y->l)
          zig(y), zig(x);
        else
          zag(x), zig(x);
      } else {
        if (x == y->l)
          zig(x), zag(x);
        else
          zag(y), zag(x);
      }
    }
  }
  push(x);
  update(*r = x);
}
int n, len, h, a[150000 + 1], b[150000 + 1], p[150000 + 1];
inline Node *find(int k) {
  static Node *x;
  for (x = root;;) {
    push(x);
    if (x->l) {
      if (x->l->s >= k) {
        x = x->l;
        continue;
      }
      k -= x->l->s;
    }
    if (k == 1) break;
    --k, x = x->r;
  }
  return x;
}
void insert(int i) {
  if (!root) {
    root = new Node(a[i], p[i] - 1);
  } else {
    int s = 1;
    bool left = false;
    static Node *x, *f;
    for (x = root, f = NULL; x != NULL;) {
      push(f = x);
      if (x->p >= a[i])
        x = x->l, left = true;
      else {
        s += (x->l ? x->l->s : 0) + 1;
        x = x->r, left = false;
      }
    }
    x = new Node(a[i], p[i] - s);
    x->f = f;
    if (left)
      f->l = x;
    else
      f->r = x;
    splay(x, &root);
    if (root->r) apply(root->r, -1);
    update(root);
  }
}
void remove(int i) {
  if (root->s == 1) {
    delete root;
  } else {
    int s = 1;
    static Node *x;
    for (x = root; x->p != a[i];) {
      push(x);
      if (x->p < a[i]) {
        s += (x->l ? x->l->s : 0) + 1;
        x = x->r;
      } else
        x = x->l;
    }
    if (x->l) s += x->l->s;
    if (s == root->s) {
      splay(x, &root);
      root->l->f = NULL;
      root = root->l;
      delete x;
    } else {
      if (s == 1) {
        splay(x, &root);
        root->r->f = NULL;
        root = root->r;
        delete x;
        apply(root, 1);
      } else {
        splay(find(s - 1), &root);
        splay(find(s + 1), &(root->r));
        delete x;
        root->r->l = NULL;
        update(root->r), update(root);
        splay(find(s - 1), &root);
        apply(root->r, 1);
        update(root);
      }
    }
  }
}
void dfs(Node *x) {
  push(x);
  if (x->l) dfs(x->l);
  printf("%d ", x->p);
  if (x->r) dfs(x->r);
}
int main(int argc, char *argv[]) {
  scanf("%d%d%d", &n, &len, &h);
  for (int i = 1; i <= len; ++i) scanf("%d", b + i);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i);
  sort(b + 1, b + len + 1);
  for (int i = 1; i <= n; ++i)
    p[i] = len - (lower_bound(b + 1, b + len + 1, h - a[i]) - b) + 1;
  reverse(b + 1, b + len + 1);
  int ans = 0;
  for (int i = 1; i < len; ++i) insert(i);
  for (int i = len; i <= n; ++i) {
    insert(i);
    if (root->m >= 0) ++ans;
    remove(i - len + 1);
  }
  printf("%d\n", ans);
  fclose(stdin);
  fclose(stdout);
  return 0;
}
