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

/**
 * @author Don Li
 */
public class ImagePreview {
    void solve() {
        int n = in.nextInt(), a = in.nextInt(), b = in.nextInt(), T = in.nextInt();
        char[] s = in.nextToken().toCharArray();

        int[] L = new int[n];
        L[0] = s[0] == 'w' ? b + 1 : 1;
        for (int i = 1; i < n; i++) L[i] = L[i - 1] + a + 1 + (s[n - i] == 'w' ? b : 0);

        int[] R = new int[n];
        R[0] = L[0];
        for (int i = 1; i < n; i++) R[i] = R[i - 1] + a + 1 + (s[i] == 'w' ? b : 0);

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int r = T - R[i];
            if (r < 0) break;
            ans = Math.max(ans, i + 1);
            r -= i * a;
            if (r > 0) {
                int lb = 0, ub = n;
                while (ub - lb > 1) {
                    int m = (lb + ub) / 2;
                    if (L[m] - L[0] <= r) lb = m;
                    else ub = m;
                }
                ans = Math.max(ans, Math.min(n, i + 1 + lb));
            }
        }

        for (int i = 0; i < n; i++) {
            int r = T - L[i];
            if (r < 0) break;
            ans = Math.max(ans, i + 1);
            r -= i * a;
            if (r > 0) {
                int lb = 0, ub = n;
                while (ub - lb > 1) {
                    int m = (lb + ub) / 2;
                    if (R[m] - R[0] <= r) lb = m;
                    else ub = m;
                }
                ans = Math.max(ans, Math.min(n, i + 1 + lb));
            }
        }

        out.println(ans);
    }

    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new ImagePreview().solve();
        out.close();
    }

    static FastScanner in;
    static PrintWriter out;

    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;

        public FastScanner(BufferedReader in) {
            this.in = in;
        }

        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }

        public long nextLong() {
            return Long.parseLong(nextToken());
        }

        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}
