import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by tdx on 3/10/16.
 */
public class CF651D {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CF651D_ solver = new CF651D_();
        solver.solve(1, in, out);
        out.close();
    }

    static class CF651D_ {
        static final int MAX = 5 * 100000;
        int l[] = new int[MAX + 5]; // 0 -> 1 -> ... -> n -1
        int r[] = new int[MAX + 5]; // 0 -> n - 1 -> .. -> 1

        static int max(int a, int b) {
            return a > b ? a : b;
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n, a, b, T;
            String or;

            n = in.nextInt();
            a = in.nextInt();
            b = in.nextInt();
            T = in.nextInt();
            or = in.next();

            int total = 0;
            int result = 0;
            for (int i = 0; i < n; ++i) {
                total += 1 + (or.charAt(i) == 'w' ? b : 0); // rotate and view
                l[i] = total;
                if (l[i] <= T) {
                    result = max(result, 1 + i);
                }

                total += a; // swipe
            }

            total = l[0] + a; // 0 , swipe to right
            r[0] = l[0];
            for (int i = n - 1; i > 0; --i) {
                total += 1 + (or.charAt(i) == 'w' ? b : 0);
                r[i] = total;
                if (r[i] <= T) {
                    result = max(result, n - i + 1);
                }
                total += a;
            }

            // Left, then right
            int i, j = 2;
            for (i = 1; i < n; ++i) {
                int cost_0_left_i_right_0 = l[i] + i * a; // to i then i times swipe
                for (; j < n; ++j) {
                    if (r[j] - r[0] + cost_0_left_i_right_0 <= T) {
                        result = max(result, 1 + i + n - j);
                        break;
                    }
                }
            }

            // Right, then left
            j = n - 2;
            i = n - 1;
            for (; i > 0; --i) {
                int cost_0_right_i_left_0 = r[i] + (n - i) * a;
                for (; j > 0; --j) {
                    if (l[j] - l[0] + cost_0_right_i_left_0 <= T) {
                        result = max(result, n - i + 1 + j);
                        break;
                    }
                }
            }

            if (result >= n) result = n;

            out.println(result);

        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

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

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

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

        public double nextDoule() {
            return Double.parseDouble(next());
        }
    }
}
