import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Codef{
    static class resh_1{
        private int st;
        private int shag;
        private int[] an;
        private int c;
        private int t;
        private int n;
        private int dp[];
        public resh_1(int st,int shag,int[] an,int c,int t,int n,int[] dp){
            this.shag=shag;
            this.st=st;
            this.an=an;
            this.c=c;
            this.t=t;
            this.n=n;
            this.dp=dp;
        }
        public int get_ans(){
            int x=0;
            while (st>=1&&st<n&&t-an[st]-c>=0){
                t-=(an[st]+c);
                st=st+shag; x++;
            }
            return x;
        }
        public int get_ans2(){
            int x=0,y=0,l=0,r=0,a=0,m=0;
            while (st>=1&&st<n&&t-an[st]-c>=0){
                t-=(an[st]+c);
                st=st+shag; y++;
                r=n-1; l=0;
                m=Arrays.binarySearch(an, l, r, t-c*(y+1));
                //System.out.println(m);
                if (y+m>x) x=y+m;
            }
            return x;
        }
    } 
    public static void main(String[] args) throws IOException{
        BufferedReader vod=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer s=new StringTokenizer(vod.readLine());
        int n=Integer.parseInt(s.nextToken());
        int a=Integer.parseInt(s.nextToken());
        int b=Integer.parseInt(s.nextToken());
        int t=Integer.parseInt(s.nextToken());
        char[] ar=vod.readLine().toCharArray();
        int[] an=new int[n];
        int[] ax=new int[n];
        int[] dp1=new int[n];
        int[] dp2=new int[n];
        for (int i=0; i<n; i++){
            if (ar[i]=='w'){
                an[i]=b+1;
            }
            else an[i]=1;
        }
        if (an[0]>t){
            System.out.print(0);
            return;
        }
        dp1[0]=an[n-1];
        for (int i=1; i<n-1; i++){
            dp1[i]=dp1[i-1]+an[n-i-1]+a;
        }
        dp2[0]=an[1];
        for (int i=1; i<n-1; i++){
            dp2[i]=dp2[i-1]+an[i+1]+a;
        }
        t-=an[0];
        resh_1 obj;
        int ans=0,y=0;
        obj=new resh_1(1,1,an,a,t,n,dp1);
        y=obj.get_ans();
        if (ans<y) ans=y;
        obj=new resh_1(1,1,an,a,t,n,dp1);
        y=obj.get_ans2();
        if (ans<y) ans=y;
        obj=new resh_1(n-1,-1,an,a,t,n,dp2);
        y=obj.get_ans();
        if (ans<y) ans=y;
        obj=new resh_1(n-1,-1,an,a,t,n,dp2);
        y=obj.get_ans2();
        if (ans<y) ans=y;
        obj=null;
        System.out.println(ans+1);
    }
}