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();
            String pos = in.next();
            int wCount = 0;
            for (int i = 0; i < n; i++) {
                if (pos.charAt(i) == 'w') wCount++;
            }
            int l = n - 1;
            int r = 0;
            int tLeft = T - ((n - 1) * (a + 1) + wCount * b);
            int maxL = tLeft >= 0 ? (l + r + 1) : 0;
            while (l > 0 && r < n) {
                if (pos.charAt(l) == 'w') tLeft += b;
                l--;
                tLeft += a + 1;
                while (true) {
                    int nextTLeft = tLeft;
                    if (pos.charAt(n - r - 1) == 'w') {
                        nextTLeft -= b;
                    }
                    nextTLeft -= a + 1;
                    if (nextTLeft < 0) break;
                    tLeft = nextTLeft;
                    r++;
                    if (r == n) break;
                }
                if (tLeft >= 0) {
                    maxL = Math.max(maxL, l + r + 1);
                }
            }
            l = 0;
            r = n - 1;
            tLeft = T - ((n - 1) * (a + 1) + wCount * b);
            int maxR = tLeft >= 0 ? (l + r + 1) : 0;
            while (r > 0 && l < n) {
                if (pos.charAt(r) == 'w') tLeft += b;
                r--;
                tLeft += a + 1;
                while (true) {
                    int nextTLeft = tLeft;
                    if (pos.charAt(n - l - 1) == 'w') {
                        nextTLeft -= b;
                    }
                    nextTLeft -= a + 1;
                    if (nextTLeft < 0) break;
                    tLeft = nextTLeft;
                    l++;
                    if (l == n) break;
                }
                if (tLeft >= 0) {
                    maxR = Math.max(maxL, l + r + 1);
                }
            }
            out.println(Math.min(Math.max(maxL, maxR), n));
        }

    }

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

    }
}

