
import java.io.*;
import java.util.*;

public class Codeforces {

    int n,a,b,t;
    public int solve1(char[]str){
        int[]pp = new int[n];
        pp[0] = 1+(str[0]=='w'?b:0);
        for(int i=1;i<n;i++){
            pp[i] = pp[i-1]+1+(str[i]=='w'?b:0)+a;
        }
        int[]qq = new int[n+1];
        qq[n] = 0;
        for(int i=n-1;i>=0;i--){
            qq[i] = qq[i+1]+1+(str[i]=='w'?b:0)+a;
        }
        int l = n-1;
        while (l >= 0 && pp[l] > t ) l--;
        int ans = l+1;
        for(int r = n;l>=0;l--){
            while (r > l && pp[l]+qq[r]+l*a <= t ){
                r--;
            }
            ans = Math.max(ans,l+1+n-1-r);
        }
        return ans;
    }
    public  void solve() {
        FastScanner fs = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
        n = fs.nextInt();
        a = fs.nextInt();
        b = fs.nextInt();
        t = fs.nextInt();
        char[]str = fs.nextLine().toCharArray();
        int ans = solve1(str);
        for(int i=0,j=n-1;i<j;i++,j--){
            char tmp = str[i];
            str[i] = str[j];
            str[j] = str[i];
        }
        ans = Math.max(ans,solve1(str));
        out.println(ans);
        out.flush();
    }
    public static void main(String[]args){
        try{
            new Codeforces().solve();
        }catch (Exception e){
            e.printStackTrace();
        }

    }
    class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }
}
