import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class D implements Runnable {

    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    private BufferedReader in;
    private PrintWriter out;
    private StringTokenizer tok = new StringTokenizer("");

    private void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        String fileName = "";
        if (ONLINE_JUDGE && fileName.isEmpty()) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

    String readString() {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() {
        return Integer.parseInt(readString());
    }

    long readLong() {
        return Long.parseLong(readString());
    }

    double readDouble() {
        return Double.parseDouble(readString());
    }

    int[] readIntArray(int size) {
        int[] a = new int[size];
        for (int i = 0; i < size; i++) {
            a[i] = readInt();
        }
        return a;
    }

    public static void main(String[] args) {
        //new Thread(null, new _Solution(), "", 128 * (1L << 20)).start();
        new D().run();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    @Override
    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    private void solve() {
        int n = readInt();
        long a = readInt();
        long b = readInt();
        int T = readInt();

        char[] s = readString().toCharArray();
        long[] prefix = new long[n];
        long[] suffix = new long[n];

        for (int i = 0; i < n; i++) {
            if (i > 0) {
                prefix[i] = prefix[i - 1] + a;
            }
            if (s[i] == 'w') {
                prefix[i] += b;
            }
            prefix[i]++;
        }

        for (int i = n - 1; i >= 0; i--) {
            if (i < n - 1) {
                suffix[i] = suffix[i + 1] + a;
            } else {
                suffix[i] = a;
            }
            if (s[i] == 'w') {
                suffix[i] += b;
            }
            suffix[i]++;
        }

        int answer = 0;

        for (int startPhoto = 0; startPhoto < n; startPhoto++) {
            /* For prefix */
            long time = prefix[startPhoto];
            int left = 0, right = n - 1;
            while (left <= right) {
                int mid = (left + right) >> 1;
                long curTime = time + 1l * Math.min(mid, startPhoto) * a;
                int curCount = startPhoto + 1;
                int finishIndex = startPhoto - mid;
                if (finishIndex < 0) {
                    curTime += suffix[finishIndex + n];
                    curCount += Math.abs(finishIndex);
                }
                if (curTime <= T) {
                    answer = Math.max(answer, curCount);
                    left = mid + 1;
                } else {
                    right = mid - 1;
                }
            }

            /* For suffix */
//            time = suffix[startPhoto];
//            left = 0;
//            right = n - 1;
//            while (left <= right) {
//                int mid = (left + right) >> 1;
//                long curTime = time;
//                if (startPhoto + mid >= n) {
//                    curTime += 1l * (n - startPhoto) * a;
//                } else {
//                    curTime += mid * a;
//                }
//                int curCount = n - startPhoto + 1;
//                int finishIndex = startPhoto + mid;
//                if (finishIndex > n) {
//                    curTime += prefix[finishIndex - n - 1];
//                    curCount += finishIndex - n - 1;
//                }
//                if (curTime <= T) {
//                    answer = Math.max(answer, curCount);
//                    left = mid + 1;
//                } else {
//                    right = mid - 1;
//                }
//            }
        }
        out.println(answer);
    }
}
