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

/**
 * 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();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int a = in.nextInt();
            int b = in.nextInt();
            int T = in.nextInt();
            char[] s = in.next().toCharArray();
            int[] d = new int[n];
            for (int i = 0; i < n; ++i) {
                d[i] = a;
                if (s[i] == 'w')
                    d[i] += b;
            }
            d[0] -= a;
            if (d[0] + 1 > T) {
                out.println(0);
                return;
            }
            int res = 0;
            for (int it = 0; it < 2; ++it) {
                int l = 0, lval = d[0] + 1;
                while (l < n && lval <= T) {
                    ++l;
                    lval += d[n - l] + 1;
                }
                if (l == n && lval <= T) {
                    res = l;
                    break;
                }
                int r = 0, rval = 0;
                while (l > 0) {
                    lval -= d[n - l] + 1;
                    --l;
                    while (r < n && lval + rval + a * l <= T) {
                        ++r;
                        rval += d[r] + 1;
                    }
                    int cnt = l + 1;
                    if (r > 0) {
                        if (lval + rval + a * l <= T)
                            cnt += r;
                        else
                            cnt += r - 1;
                    }
                    if (cnt > n) cnt = n;
                    if (res < cnt) res = cnt;
                }

                for (int i = 1; i < (n + 1) / 2; ++i) {
                    int j = n - i;
                    int tmp = d[i];
                    d[i] = d[j];
                    d[j] = tmp;
                }
            }
            out.println(res);
        }

    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer stt;

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

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        public String next() {
            while (stt == null || !stt.hasMoreTokens()) {
                stt = new StringTokenizer(nextLine());
            }
            return stt.nextToken();
        }

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

    }
}

