#include<bits/stdc++.h>
//#pragma comment(linker,"/STACK:1024000000,1024000000")
//251103FD
using namespace std;
#define PB pop_back
#define PF pop_front
#define np next_permutation
#define eb emplace_back
#define pb push_back
#define bf push_front
#define mp make_pair
#define s second
#define f first
#define mt make_tuple
#define foreach(it, a) for(__typeof((a).begin()) it=(a).begin(); it!=(a).end(); it++)
#define forn(i, a) for(int i=0; i<a; i++)
#define Forn(i, a) for(int i=1; i<=a; i++)
#define read(x) ((scanf("%s", &_), (x) = _))
#define INF 1e9
#define memINF 127
#define inf 1e18
#define all(x) x.begin(), x.end()
#define MOD 1e9+7 
#define HASH 1543 
#define FAST ios_base::sync_with_stdio(0)

typedef long long ll;
typedef pair<int,int> pi;
typedef pair<pi,int> pii;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef unsigned int uint;
typedef vector<vector<ll> > matrix;

inline int in() 
{
    int x=0, c;
    while((uint)((c=getchar())-48)>=10) 
		if(c=='-') 
			return -in();
    do 
	{ x=(x<<3)+(x<<1)+(c^48); }
	while((uint)((c=getchar())^48)<10);
    return x;
}
inline int lcm(int a, int b){return a*b/__gcd(a, b);}

int N, a, b, res, l, r, mid, k;
char s[500005];
ll turnl[500005], turnr[500005], T;

inline bool check()
{
    ll t=turnl[k]+(k*a<<1)+k+1+turnl[N-1]-turnl[mid-1]+(N-mid)*(a+1);
    return t<=T;
}

int main()
{
    N=in(), a=in(), b=in(), T=in(), scanf("%s", &s);
    turnl[0]=(s[0]=='w')*b;
    Forn(i, N-1)
        turnl[i]=turnl[i-1]+(s[i]=='w')*b;
    
    turnr[N]=0;
    for(int i=N-1; i>-1; i--)
        turnr[i]=turnr[i+1]+(s[i]=='w')*b;
    forn(i, N)
    {
        k=l=min(i-1, 0), r=N;
        while(l+1<r)
        {
            mid=(l+r)>>1;
            if(check())
                r=mid;
            else
                l=mid;
        }
        mid=r;
        if(check())
        res=max(res, i+1+N-r);
    }
    printf("%d\n", min(res, N));
    return 0;
}