1 #include<iostream>
2 #include<cstdio>
3 #include<cstdlib>
4 #include<cmath>
5 #include<algorithm>
6 #include<cmath>
7 #include<queue>
8 #define llg long long
9 #define yyj(s) freopen(s".in","r",stdin),freopen(s".out","w",stdout);
10 #define maxn 100010
11 using namespace std;
12
13 llg sc()
14 {
15 llg i=0;char c=getchar();
16 while(c>‘9‘||c<‘0‘)c=getchar();
17 while(c>=‘0‘&&c<=‘9‘)i=i*10+c-‘0‘,c=getchar();
18 return i;
19 }
20
21 llg x,i,j,k,n,l,r,mid,m,a[maxn],ans;
22 double res,b,wz,lastwz;
23 int main()
24 {
25 yyj("a");
26 cin>>n>>m>>b;
27 for (i=1;i<=n;i++) a[i]=sc();
28 res=b;
29 x=1;
30 ans=1;
31 l=0; lastwz=a[1];
32 for (r=2;r<=n;r++)
33 {
34 if (a[r]>m) break;
35 x++;
36 if (x % 2) wz=a[l+x/2+1]; else wz=(double)(a[l+x/2]+a[l+x/2+1])/2;
37 if (x % 2==0) res-=(wz-lastwz);
38 res-=a[r]-wz; lastwz=wz;
39 while (res<0)
40 {
41 x--; l++; res+=lastwz-a[l];
42 if (x % 2) wz=a[l+x/2+1]; else wz=(a[l+x/2]+a[l+x/2+1])/2;
43 if (x % 2) res+=wz-lastwz;
44 lastwz=wz;
45 }
46 ans=max(ans,x);
47 }
48 cout<<ans;
49 return 0;
50 }