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

public class Main {

	BufferedReader in;
	StringTokenizer str = null;
	PrintWriter out;

	private String next() throws Exception{
		while (str == null || !str.hasMoreElements())
			str = new StringTokenizer(in.readLine());
		return str.nextToken();
	}

	private int nextInt() throws Exception{
		return Integer.parseInt(next());
	}

	private long nextLong() throws Exception{
		return Long.parseLong(next());
	}

	private double nextDouble() throws Exception{
		return Double.parseDouble(next());
	}

	final int oo = Integer.MAX_VALUE;

    int n, a, b;
    int []forward, backward;

	public void run() throws Exception{
		in =  new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);

        n = nextInt();
        a = nextInt();
        b = nextInt();
        int T = nextInt();

        char []images = next().toCharArray();
        forward = new int[n];
        forward[0] = 1;
        if (images[0] == 'w') {
            forward[0] += b;
        }
        for(int i = 1; i < n; ++i) {
            forward[i] = forward[i - 1] + 1 + a;
            if (images[i] == 'w') {
                forward[i] += b;
            }
        }

        // System.out.println(Arrays.toString(forward));

        backward = new int[n];
        backward[0] = 1;
        if (images[n - 1] == 'w') {
            backward[0] += b;
        }
        for(int i = 1; i < n; ++i) {
            backward[i] = backward[i-1] + a + 1;
            if (images[n - i - 1] == 'w') {
                backward[i] += b;
            }
        }

        // System.out.println(Arrays.toString(backward));

        // System.out.println(time(4));
        // for(int i = 0; i <= n; ++i) System.out.println(i + " " + time(i));

        int lo = -1, hi = n + 1;
        while(hi - lo > 1) {
            int mid = lo + (hi - lo) / 2;
            if (time(mid) <= T) {
                lo = mid;
            }else {
                hi = mid;
            }
        }

        out.println(lo);
		out.close();
	}

    private int time(int x) {
        if (x == 0) return 0;
        int minTime = forward[x - 1];
        for(int i = 0; i + 1 < x; ++i) {
            int time = forward[i];
            time += (i + 1) * a;
            time += backward[x - i - 2];
            // System.out.println(i + " " + time + " = " + forward[i] + " + " + (i + 1) * a + " + " + backward[x - i - 2]);
            minTime = Math.min(minTime, time);

            time = forward[0];
            time += backward[x - i - 2];
            time += (x - i) * a;
            time += forward[i] - forward[0];

            // System.out.println((x - i - 2) + " " + time + " = " + forward[0] + " + " + backward[x - i - 2] + " + " + (x - i) * a + " + " + (forward[i] - forward[0]));

            minTime = Math.min(minTime, time);
        }

        return minTime;
    }

	public static void main(String[] args) throws Exception{
		new Main().run();
	}
}
