#include <stdlib.h>
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <stack>
#include <queue>
#include <cctype>
#include <cstdio>
#include <string>
#include <vector>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <bitset>
#include <iomanip>
#include <tr1/unordered_map>
using namespace std;
#define _INDEX(i,j,n) ((i)*(n)+(j))
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>0?(a):(-1*(a)))
#define MEMSET(a,v) memset(a,(v),sizeof(a))
#define MEMCLEAR(a) MEMSET(a,0)
#define RI(X) scanf("%d", &(X))
#define RII(X, Y) scanf("%d %d", &(X), &(Y))
#define RIII(X, Y, Z) scanf("%d %d %d", &(X), &(Y), &(Z))
#define RL(X) scanf("%I64d", &(X))
#define RLL(X, Y) scanf("%I64d %I64d", &(X), &(Y))
#define RLLL(X, Y, Z) scanf("%I64d %I64d %I64d", &(X), &(Y), &(Z))
typedef long long ll;
typedef double long dl;
const int MAX_N=5e5+5;
const int MAX_AB=1000;
const int MAX_T=1e9+1;
ll n,a,b,T;
char img[MAX_N];
ll fi[2][MAX_N];
void init() {
    MEMCLEAR(img);
    MEMCLEAR(fi);
}
template<typename TP>
void print(TP arr[],int len,const char* descr=NULL) {
    if(descr)
        cout<<descr;
    for(int i=0;i<len;i++)
        cout<<arr[i]<<" ";
    cout<<endl;
}
int calc(int mid,int dir) {
    if(fi[dir][mid]>T) {
        return -1;
    }
    if(mid==n-1)
        return n;
    ll k=T-fi[dir][mid]-(mid+1)*a;
    if(k<=0)
        return mid+1;
    ll* rfi=fi[1-dir];
    ll* p=lower_bound(rfi,rfi+n-(mid+1),k);
    if(p==rfi+n-mid-1)
        return n;
    if(*p>k)
        p--;
    return mid+1+(p-rfi+1);
}
void pre_calc() {
    ll t=0,rt=0;
    for(int i=0;i<n;i++) {
        if(img[i]=='w')
            t+=b;
        t+=1;
        fi[0][i]=t;
        t+=a;
        if(img[n-1-i]=='w')
            rt+=b;
        rt+=1;
        fi[1][i]=rt;
        rt+=a;
    }
}
void solve() {
    pre_calc();
    ll ans=0;
    for(int i=0;i<n;i++) {
        for(int d=0;d<2;d++) {
            ll t=calc(i,d);
            if(t!=-1)
                ans=MAX(ans,t);
            if(ans==n)
                break;
        }
        if(ans==n)
            break;
    }
    cout<<ans<<endl;
}
int main() {
    while(cin>>n>>a>>b>>T) {
        init();
        cin>>img;
        solve();
    }
    return 0;
}
