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);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        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();
            int[] cost = new int[n];
            char[] chars = in.next().toCharArray();
            for (int i = 0; i < n; i++) {
                cost[i] = 1;
                if (chars[i] == 'w') {
                    cost[i] += b;
                }
            }
            int[] leftToRight = new int[n];
            leftToRight[0] = cost[0];
            for (int i = 1; i < n; i++) {
                leftToRight[i] = leftToRight[i - 1] + cost[i] + a;
            }
            int[] rightToLeft = new int[n];
            rightToLeft[0] = cost[0];
            for (int i = 1; i < n; i++) {
                int currentCost = cost[n - i] + a;
                rightToLeft[i] = rightToLeft[i - 1] + currentCost;
            }
            int result = 0;
            int fooT = t;
            if (cost[0] <= fooT) result = 1;
            fooT -= cost[0];
            for (int i = 1; i < n; i++) {
                fooT -= a + cost[i];
                if (fooT < 0) break;
                result++;
            }
            fooT = t - cost[0];
            int currentResult = 0;
            for (int i = n - 1; i > 0; i--) {
                fooT -= a + cost[i];
                if (fooT < 0) break;
                currentResult++;
            }
            result = Math.max(result, currentResult);
            for (int i = 0; i < n; i++) {
                rightToLeft[i] -= leftToRight[0];
            }
            for (int i = 1; i < n; i++) {
                if (leftToRight[i] <= t) {
                    fooT = t - leftToRight[i] - i * a;
                    int r = binarySearch(rightToLeft, fooT);
                    result = Math.max(result, i + 1 + r);
                }
            }
            for (int i = 0; i < n; i++) {
                rightToLeft[i] += leftToRight[0];
            }
            for (int i = 0; i < n; i++) {
                leftToRight[i] -= rightToLeft[0];
            }
            for (int i = 1; i < n; i++) {
                if (rightToLeft[i] <= t) {
                    fooT = t - rightToLeft[i] - i * a;
                    int r = binarySearch(leftToRight, fooT);
                    result = Math.max(result, i + 1 + r);
                }
            }

            out.println(Math.min(result, n));
        }

        int binarySearch(int[] a, int key) {
            int left = 0;
            int right = a.length - 1;
            int result = 0;
            int mid;
            while (right >= left) {
                mid = (left + right) >> 1;
                if (a[mid] <= key) {
                    result = mid;
                    left = mid + 1;
                } else {
                    right = mid - 1;
                }
            }
            return 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());
        }

    }
}

