// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <iomanip>
#define dibs reserve
#define OVER9000 1234567890
#define patkan 9
#define tisic 47
#define soclose 1e-9
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define chocolate win
#define ff first
#define ss second
#define abs(x) ((x < 0)?-(x):(x))
// mylittledoge
using namespace std;
	
int main() {
    cin.sync_with_stdio(0);
    cin.tie(0);
    int N,K;
    double q;
    cin >> N >> K >> q;
    vector<double> s(N), S(N+1,0);
    for(int i =0; i < N; i++) {
    	cin >> s[i];
    	S[i+1] =S[i]+s[i];}
    
    int Rx =K; // obvious bound
    for(int R =K+1; R <= N; R++)
    	if(S[R-K]-(S[R]-S[R-K])/q < -soclose) Rx =R;

    int L =1; // first match that can't be won
    for(int R =Rx+1; R <= N; R++) {
	   	while(S[R-K]-(S[R]-S[R-K])/q > S[L-1]) L++;
    	L++;
    	while(S[R-K]-(S[R]-S[R-K])/q > S[L-1]) L++;}
    
    cout << L-1 << "\n";
    return 0;}
        
// look at my code
// my code is amazing