import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;

public class main {
    public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    public static PrintWriter pw = new PrintWriter(System.out);
    public static String line;
    public static StringTokenizer st;
    public static ArrayList<ArrayList<Integer>> adjList;

    public static void main(String[] args) throws Exception{
        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());

        char[] A = br.readLine().toCharArray();

        int[] R = new int[N];
        int[] L = new int[N];

        int total = 0;
        for(int i = 0; i < N; i++){
            total++;
            if(A[i] == 'w'){
                total += b;
            }
            R[i] = total;
            total += a;
        }

        L[0] = R[0];
        total = 0;
        for(int j = 1; j < N; j++){
            total++;
            if(A[N-j-1] == 'w'){
                total += b;
            }
            L[N-j-1] = total;
            total += a;
        }

        System.out.println(Arrays.toString(L));
        System.out.println(Arrays.toString(R));

        if(R[0] <= T){
            int max = 1;
            int j = 0;
            for(int i = 1; i < N; i++){
                if(j == i) break;
                while(R[i] + L[j] + (N-j+i-1)*a > T){
                    j++;
                    if(j == N) break;
                }
                if(j == N) break;
                if(R[i] > T) break;
                max = Math.max((N-j+i+1), max);
            }
            pw.print(max + "\n");
        } else{
            pw.print(0 + "\n");
        }
        pw.close();
        br.close();
    }
}
