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 N = 150501, M = 400;
int a[N], b[N], limit[N], num[N], vis[N];
int blockSum[M], blockMin[M], blockDelta[M];
int n, m, h, k, size;
struct xy {
  int value, index;
};
xy tmp[N];
void inti() {
  cin >> n >> m >> h;
  for (int i = 0; i < m; i++) cin >> b[i];
  for (int i = 0; i < n; i++) cin >> a[i];
}
int findLimitStation(int a) {
  int x = 0, y = m, mid;
  while (x < y) {
    mid = (x + y) >> 1;
    if (a + b[mid] >= h)
      y = mid;
    else
      x = mid + 1;
  }
  return x;
}
int cmp(xy a, xy b) { return (a.value < b.value) ? 1 : 0; }
void Insert(int x) {
  int i, j, st = 0, cnt = 0;
  for (i = 0; i < k; i++) {
    if (x < st + size) break;
    cnt += blockSum[i];
    st += size;
  }
  blockSum[i]++;
  for (j = i + 1; j < k; j++) blockDelta[j]--;
  blockMin[i] = n + 1;
  for (j = st; j < st + size; j++)
    if (vis[j]) {
      cnt += (j < x);
      limit[j] += blockDelta[i] - (j > x);
      blockMin[i] = min(blockMin[i], limit[j]);
    }
  limit[x] -= cnt;
  blockMin[i] = min(blockMin[i], limit[x]);
  blockDelta[i] = 0;
  vis[x] = 1;
}
void Delete(int x) {
  int i, j;
  i = x / size;
  vis[x] = 0;
  blockSum[i]--;
  for (j = i + 1; j < k; j++) blockDelta[j]++;
  blockMin[i] = n + 1;
  for (j = i * size; j < (i + 1) * size; j++)
    if (vis[j]) {
      limit[j] += blockDelta[i] + (j > x);
      blockMin[i] = min(blockMin[i], limit[j]);
    }
  blockDelta[i] = 0;
}
int check() {
  for (int i = 0; i < k; i++)
    if (blockSum[i] > 0)
      if (blockMin[i] + blockDelta[i] < 0) return 0;
  return 1;
}
void work() {
  sort(b, b + m);
  b[m] = h;
  int i;
  for (i = 0; i < n; i++) {
    tmp[i].index = i;
    tmp[i].value = a[i];
  }
  sort(tmp, tmp + n, cmp);
  for (i = 0; i < n; i++) num[tmp[i].index] = i;
  for (i = 0; i < n; i++) limit[i] = m - findLimitStation(tmp[i].value) - 1;
  size = (int)sqrt(n + 0.0);
  k = (n - 1) / size + 1;
  for (i = 0; i < m; i++) Insert(num[i]);
  int ans = check();
  for (i = m; i < n; i++) {
    Delete(num[i - m]);
    Insert(num[i]);
    ans += check();
  }
  cout << ans << endl;
}
int main() {
  inti();
  work();
}
