#include <bits/stdc++.h>
using namespace std;

int main() 
{
    int n;
    cin>>n; // 5

    int b[n+1]; // 1 - based indexing
    for(int i=1; i<=n; i++)
    {
        cin>>b[i]; // 1 2 3 4 5
    }

    int k;
    cin>>k; // 3

    int count = 0;
    for(int i=1; i<=n-k+1; i++) // i=1 starting point till n-k+1 means end point 5 - 3 + 1 = 3 --> i < 3
    {
        // i --> start point of Each Subarray of size 'k' which we are considering
        int start = i;
        bool check = true;
        //          'i' index it means  start index + k -  1
        int end = i + k - 1;  // 1 + 3 -1 --> 3 it means till third index it will go 

        while(start < end) // Becoz I am comparing start with one index Ahead which is start + 1
        {
            if(b[start] < b[start + 1]) // All the Adjacent Elements should be increasing order
            {
                check = true;
            }
            else
            {
                check  = false;
            }
            start = start + 1;
            // O(k)
        }
       // O(N)   

        if(check == true)
        {
            count = count + 1;
        }
    }
    cout<<count;

    return 0;
}

/*
input:
5
1 2 3 4 5  
3

output:
3

How did the output 3 came 
1 < 2 < 3 <  4 < 5

k = 3 subarray  size should be 3

1 < 2 < 3 --> 1 subarray
2 < 3 < 4 --> 2 subarray
3 < 4 < 5 --> 3 subarray 


*/