/**
 * Created by Martin on 4/12/2016.
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.PrintWriter;

public class Main {

    public static void main(String[]args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());
        int N = Integer.parseInt(st.nextToken());
        int a = Integer.parseInt(st.nextToken());
        int b = Integer.parseInt(st.nextToken());
        int T = Integer.parseInt(st.nextToken());
        String s = br.readLine();
        int[]fow = new int[N];
        int[]back = new int[N];
        fow[0] = back[0] = 1 + ((s.charAt(0) == 'w')?b:0);
        for (int i=1;i<N;i++) {
            fow[i] += fow[i-1] +  a + 1;
            if (s.charAt(i) == 'w') fow[i] += b;
        }
        for (int i=N-1;i>0;i--) {
            back[N-i] += back[N-i-1] + a + 1;
            if (s.charAt(i) == 'w') back[N-i] += b;
        }
        //debug(fow);
        //debug(back);
        int maxi = (fow[0]<=T)?1:0;
        int backptr = N-1;
        for (int i=1;i<fow.length;i++) {
            if (fow[i] > T) break;
            while(backptr + i > N - 1) backptr--;
            while(backptr >= 0 && back[backptr] + fow[i] - fow[0] + i * a > T) {
                //debug("front dev", i, backptr, back[backptr] + fow[i] - fow[0] + i * a);
                backptr--;
            }

            int res = Math.max(backptr, 0) + i + 1;
            //debug("front", i, res, backptr);
            maxi = Math.max(res, maxi);
        }

        backptr = N-1;
        for (int i=1;i<fow.length;i++) {
            if (back[i] > T) break;
            while(backptr + i > N - 1) backptr--;
            while(backptr >= 0 && fow[backptr] + back[i] - back[0] + i * a > T) {
                //debug("back dec", i, backptr, fow[backptr] + back[i] - back[0] + i * a);
                backptr--;
            }
            int res = Math.max(backptr, 0) + i + 1;
            //debug("back", i, res, backptr);
            maxi = Math.max(res, maxi);
        }

        pw.println(maxi);
        pw.flush();
    }

    public static void debug(Object...args) {
        System.out.println(Arrays.deepToString(args));
    }
}

