// 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
Ly8gaW9zdHJlYW0gaXMgdG9vIG1haW5zdHJlYW0KI2luY2x1ZGUgPGNzdGRpbz4KLy8gYml0Y2ggcGxlYXNlCiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPHNldD4KI2luY2x1ZGUgPG1hcD4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHF1ZXVlPgojaW5jbHVkZSA8c3RhY2s+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxpb21hbmlwPgojZGVmaW5lIGRpYnMgcmVzZXJ2ZQojZGVmaW5lIE9WRVI5MDAwIDEyMzQ1Njc4OTAKI2RlZmluZSBwYXRrYW4gOQojZGVmaW5lIHRpc2ljIDQ3CiNkZWZpbmUgc29jbG9zZSAxZS05CiNkZWZpbmUgQUxMX1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