import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        long a = in.nextInt();
        long b = in.nextInt();
        long t = in.nextInt();

        String s = in.next();

        long[] cost = new long[n];
        long[] cost2 = new long[n];

        long prev = 1;

        if (s.charAt(0) == 'w') {
            prev += b;
        }

        cost[0] = prev;

        for (int i=1; i<n; i++){
            long curr = cost[i-1] + a;
            curr++;

            if (s.charAt(i) == 'w') {
                curr += b;
            }

            cost[i] = curr;
        }

        for (int i=0; i<n; i++){
            cost2[i] = cost[i] + i * a;
        }

        int best = find(cost, t, n-1) + 1;
        long curr = 0;

        for (int i=n-1; i>0; i--){
            curr += a;
            curr++;

            if (s.charAt(i) == 'w'){
                curr += b;
            }

            if (curr > t){
                break;
            }

            int index1 = find(cost, t-curr - (n-1-i+1) * a, i-1);
            int index2 = find(cost2, t-curr, i-1);

            best = Math.max(best, n-1 -i+1 + index1+1);
            best = Math.max(best, n-1 -i+1 + index2+1);
        }

        out.println(best);
    }

    private int find(long[] cost, long t, int right) {
        int left = 0;

        while (left <= right){
            int mid = left + (right-left)/2;

            if (cost[mid] <= t){
                left = mid+1;
            } else {
                right = mid-1;
            }
        }

        return right;
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;


    public InputReader(InputStream stream){
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String next(){
        while (tokenizer == null || !tokenizer.hasMoreTokens()){
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException("FATAL ERROR", e);
            }
        }

        return tokenizer.nextToken();
    }

    public int nextInt(){
        return Integer.valueOf(next());
    }

}

