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());

        String S = br.readLine();

        int[] M = new int[N+N-1];
        int total = 0;
        for(int i = 0; i < N; i++){
            if(S.charAt(i) == 'w'){
                total += b;
            }
            total++;
            M[i+N-1] = total;
            total += a;
        }

        total = M[N-1]+a;
        for(int i = N-1; i >= 1; i--){
            total++;
            if(S.charAt(i) == 'w'){
                total += b;
            }
            M[i-1] = total;
            total += a;
        }

        int base = M[N-1];
        int i = 0;
        int j = N-1;
        int best = 0;
        int cost = 0;
        while(j < N+N-1){
            cost = Math.min(N-1-i, j-(N-1))*a;
            if(j - i >= N){
                j++;
                continue;
            }
            if(j >= N+N-1 || i > N-1) break;

            if(M[i] + M[j] - M[N-1] + cost <= T){
                // System.out.println(i + " " + j);
                best = Math.max(j-i+1, best);
                j++;
            } else{
                i++;
            }
        }
        pw.print(best + "\n");
        // System.out.println(Arrays.toString(M));
        pw.close();
        br.close();
    }
}
