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;
int tree[524288][4], a[150005], b[150005], len, n, h, L, R, mid, ans, i;
int cmp(int i, int j) { return i < j; }
void Update(int x) {
  tree[x * 2][2] += tree[x][3];
  tree[x * 2][3] += tree[x][3];
  tree[x * 2 + 1][2] += tree[x][3];
  tree[x * 2 + 1][3] += tree[x][3];
  tree[x][3] = 0;
}
void work(int root, int l, int r, int t) {
  int mid = (tree[root][0] + tree[root][1]) / 2;
  if (tree[root][0] == l && tree[root][1] == r) {
    tree[root][2] += t;
    tree[root][3] += t;
    return;
  }
  Update(root);
  if (l <= mid) work(root * 2, l, min(mid, r), t);
  if (r > mid) work(root * 2 + 1, max(mid + 1, l), r, t);
  tree[root][2] = min(tree[root * 2][2], tree[root * 2 + 1][2]);
}
int WORK(int root, int l, int r) {
  int mid = (tree[root][0] + tree[root][1]) / 2, p = 0, q = 0;
  if (tree[root][0] == l && tree[root][1] == r) return tree[root][2];
  Update(root);
  if (l <= mid) p = WORK(root * 2, l, min(mid, r));
  if (r > mid) q = WORK(root * 2 + 1, max(mid + 1, l), r);
  return min(p, q);
}
int main() {
  scanf("%d%d%d", &n, &len, &h);
  for (i = 1; i <= len; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (i = 262144; i < 524288; i++) tree[i][0] = tree[i][1] = i;
  for (i = 262143; i >= 1; i--) {
    tree[i][0] = tree[i * 2][0];
    tree[i][1] = tree[i * 2 + 1][1];
  }
  sort(a + 1, a + len + 1, cmp);
  for (i = 1; i <= n; i++) {
    L = 1;
    R = len;
    mid = (L + R) / 2;
    while (L <= R) {
      if (a[mid] + b[i] >= h) {
        R = mid - 1;
        mid = (L + R) / 2;
      } else {
        L = mid + 1;
        mid = (L + R) / 2;
      }
    }
    b[i] = len + 1 - L;
  }
  for (i = 1; i <= len; i++) tree[i + 262143][2] = -len + i - 1;
  for (i = 262143; i >= 1; i--)
    tree[i][2] = min(tree[i * 2][2], tree[i * 2 + 1][2]);
  for (i = 1; i <= len; i++)
    if (b[i]) work(1, 262144, 262143 + b[i], 1);
  if (WORK(1, 262144, 262143 + len) >= 0) ans++;
  for (i = len + 1; i <= n; i++) {
    if (b[i - len]) work(1, 262144, 262143 + b[i - len], -1);
    if (b[i]) work(1, 262144, 262143 + b[i], 1);
    if (WORK(1, 262144, 262143 + len) >= 0) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
