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
 *
 * @author Artyom Korzun
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static
    @SuppressWarnings("Duplicates")
    class TaskD {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.nextInt();
            int a = in.nextInt();
            int b = in.nextInt();
            long t = in.nextInt();

            char[] p = in.nextWord();
            long[] direct = new long[n];
            long[] inverse = new long[n];

            direct[0] = 1 + ((p[0] == 'w') ? b : 0);
            inverse[0] = direct[0];
            for (int i = 1; i < n; i++) {
                direct[i] = direct[i - 1] + a + 1 + ((p[i] == 'w') ? b : 0);
                inverse[i] = inverse[i - 1] + a + 1 + ((p[n - i] == 'w') ? b : 0);
            }

            int answer = 0;

            for (int i = 0, j = n - 1; i < n; i++) {
                if (direct[i] > t)
                    break;

                while (j > 0 && (direct[i] + inverse[j] - inverse[0] + a * i) > t)
                    j--;

                answer = Math.max(answer, Math.min(i + j + 1, n));
            }

            for (int i = 0, j = n - 1; i < n; i++) {
                if (inverse[i] > t)
                    break;

                while (j > 0 && (inverse[i] + direct[j] - direct[0] + a * i) > t)
                    j--;

                answer = Math.max(answer, Math.min(i + j + 1, n));
            }

            out.print(answer);
        }

    }

    static class FastScanner {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

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

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

        public char[] nextWord() {
            return next().toCharArray();
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens())
                tokenizer = new StringTokenizer(nextLine());

            return tokenizer.nextToken();
        }

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

    }
}

