import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.TreeSet;
import java.util.Map;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Arthur Gazizov  [2oo7] - Kazan FU
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, FastScanner in, FastPrinter out) {
            int n = in.nextInt();
            int skip = in.nextInt();
            int pivot = in.nextInt();
            int haveTime = in.nextInt();
            int max = 0;
            boolean[] needPivot = new boolean[n];
            int temp = 0;
            for (char c : in.next().toCharArray()) {
                needPivot[temp++] = c == 'w';
            }
            TreeSet<Integer> needTime = new TreeSet<>();
            Map<Integer, Integer> pictureByTime = new HashMap<>();
            temp = 1 + (needPivot[0] ? pivot : 0);
            if (temp <= haveTime) {
                max = 1;
                pictureByTime.put(temp, 0);
                needTime.add(temp);
            }
            int timeToReturnBack = skip;
            for (int i = 1; i < n && temp < haveTime; i++) {
                temp += skip;
                temp += 1 + (needPivot[i] ? pivot : 0);
                if (temp > haveTime) {
                    break;
                } else {
                    max = i;
                }
                needTime.add(temp + timeToReturnBack);
                pictureByTime.put(temp + timeToReturnBack, i);
            }
            int timeToLeft = 0;
            int view = 1;
            for (int i = n - 1; i >= 0 && timeToLeft < haveTime; i--) {
                timeToLeft += skip;
                timeToLeft += 1 + (needPivot[i] ? pivot : 0);
                if (timeToLeft > haveTime) {
                    break;
                }
                int freeTime = haveTime - timeToLeft;
                int idRight = -1;
                if (needTime.contains(freeTime)) {
                    idRight = pictureByTime.get(freeTime);
                } else {
                    if (needTime.lower(freeTime) == null) {
                        break;
                    } else {
                        int lower = needTime.lower(freeTime);
                        idRight = pictureByTime.get(lower);
                    }
                }
                int canSee = (idRight + 1) + view;
                if (canSee > n) {
                    max = n;
                } else {
                    max = Math.max(max, canSee);
                }
                view++;
            }
            out.print(max);
        }

    }

    static class FastScanner extends BufferedReader {
        boolean isEOF;

        public FastScanner(InputStream is) {
            super(new InputStreamReader(is));
        }

        public FastScanner(InputStreamReader inputStreamReader) {
            super(inputStreamReader);
        }

        public int read() {
            try {
                int ret = super.read();
                if (isEOF && ret < 0) {
                    throw new InputMismatchException();
                }
                isEOF = ret == -1;
                return ret;
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }

        public String next() {
            StringBuilder sb = new StringBuilder();
            int c = read();
            while (isWhiteSpace(c)) {
                c = read();
            }
            while (!isWhiteSpace(c)) {
                sb.appendCodePoint(c);
                c = read();
            }
            return sb.toString();
        }

        public static boolean isWhiteSpace(int c) {
            return c >= -1 && c <= 32;
        }

        public int nextInt() {
            int c = read();
            while (isWhiteSpace(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int ret = 0;
            while (!isWhiteSpace(c)) {
                if (c < '0' || c > '9') {
                    throw new NumberFormatException("digit expected " + (char) c
                            + " found");
                }
                ret = ret * 10 + c - '0';
                c = read();
            }
            return ret * sgn;
        }

        public String readLine() {
            try {
                return super.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }

    }

    static class FastPrinter extends PrintWriter {
        public FastPrinter(Writer writer) {
            super(writer);
        }

        public FastPrinter(OutputStream out) {
            super(out);
        }

        public void close() {
            super.close();
        }

    }
}

