import java.io.*;
import java.util.*;

public class SNSTemplate implements Runnable {

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

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Exception e) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
    }

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

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

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

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

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

    public static void main(String[] args) {
        new Thread(null, new SNSTemplate(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

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

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (NoSuchElementException e) {
            while (true) ;
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    int calc(char[] ori, int a, int b, int t) {
        int n = ori.length;

        t -= 1;
        if (ori[0] == 'w') t -= b;
        if (t < 0) {
            return 0;
        }
        if (n == 1) {
            return 1;
        }

        long[] pb = new long[n];
        pb[n - 1] = a + 1;
        if (ori[n - 1] == 'w') pb[n - 1] += b;
        for (int i = n - 2; i >= 0; i--) {
            pb[i] = pb[i + 1] + a + 1;
            if (ori[i] == 'w') pb[i] += b;
        }

        int curMax = 1;
        long time = 0;
        for (int i = 1; i < n; i++) {
            time += a + 1;
            if (ori[i] == 'w') time += b;
            if (time <= t) {
                curMax = Math.max(curMax, i + 1);
            }
            long shiftleft = (long) i * a;
            long ntime = time + shiftleft;
            if (ori[i] != ori[n - 1]) ntime += b;
            int l = i + 1;
            int r = n - 1;
            int ans = -1;
            while (l <= r) {
                int mid = (l + r) / 2;
                if (ntime + pb[mid] <= t) {
                    ans = mid;
                    r = mid - 1;
                } else {
                    l = mid + 1;
                }
            }
            if (ans == -1) continue;
            curMax = Math.max(curMax, i + 1 + (n - ans));
        }
        return Math.min(curMax, n);
    }

    void solve() throws IOException {
        int n = readInt();
        int a = readInt();
        int b = readInt();
        int t = readInt();


        char[] ori = readString().toCharArray();
        n = ori.length;

        char[] ori2 = new char[n];
        ori2[0] = ori[0];
        for (int i = 1; i < n; i++) {
            ori2[i] = ori[n - i];
        }
        out.println(Math.max(calc(ori, a, b, t), calc(ori2, a, b, t)));

    }


}