import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;

public class TaskD {
    StringTokenizer st;
    PrintWriter out;
    BufferedReader in;

    public static void main(String[] args) throws IOException {
        TaskD solver = new TaskD();
        solver.open();
        solver.solve();
        solver.close();

    }


    private void solve() throws IOException {
        int n = nextInt();
        int change = nextInt();
        int rotate = nextInt();
        int time = nextInt();

        int[] needRotateFirst = new int[n];
        char[] str = nextToken().toCharArray();
        for (int i = 0; i < str.length; i++) {
            char c = str[i];
            needRotateFirst[i] = c == 'w' ? rotate : 0;
        }

        int[] timeLeftRight = new int[n];

        timeLeftRight[0] = 1 + (needRotateFirst[0]);
        int ansLR = 0;
        if (timeLeftRight[0] <= time) ansLR = 1;
        for (int i = 1; i < n; i++) {
            timeLeftRight[i] = timeLeftRight[i - 1] + change + 1 + needRotateFirst[i];
            if (timeLeftRight[i] <= time) ansLR = i + 1;
        }

        int[] timeRightLeft = new int[n];
        timeRightLeft[n - 1] = timeLeftRight[0] + change + 1 + needRotateFirst[n - 1];
        int ansRL = 0;
        if (timeRightLeft[n - 1] <= time) ansRL = 2;

        for (int i = n - 2; i >= 0; i--) {
            timeRightLeft[i] = timeRightLeft[i + 1] + change + 1 + needRotateFirst[i];
            if (i != 0)
                if (timeRightLeft[i] <= time) ansRL = n - i + 1;
        }

        if (ansRL == n || ansLR == n) {
            out.println(n);
            return;
        }

        int ansLRAdd = 0;

        int[] timeRightLeftSorted = timeRightLeft.clone();
        Arrays.sort(timeRightLeftSorted);
        for (int i = 0; i < n; i++) {
            if (timeLeftRight[i] > time) break;
            int ansTmp = i + 1;
            int timeTmp = timeLeftRight[i] + change * i;
            int timePart = time - timeTmp + timeLeftRight[0];
            if (timePart <= 0) break;
            int ind = Arrays.binarySearch(timeRightLeftSorted, timePart);
            if (ind < 0) {
                ind = -(ind + 1);
            } else {
                ind++;
            }
            ansTmp += ind;
            if (ansLRAdd < ansTmp) ansLRAdd = ansTmp;
        }

        int ansRLAdd = 0;

        for (int i = n - 1; i > 0; i--) {
            if (timeRightLeft[i] > time) break;
            int ansTmp = n - i + 1;
            int timeTmp = timeRightLeft[i] + change * (ansTmp - 1);
            int timePart = time - timeTmp + timeLeftRight[0];
            if (timePart <= 0) break;
            int ind = Arrays.binarySearch(timeLeftRight, timePart);
            if (ind < 0) {
                ind = -(ind + 1);
                ind--;
            }
            ansTmp += ind;
            if (ansRLAdd < ansTmp) ansRLAdd = ansTmp;
        }

        out.println(Math.max(Math.max(ansLRAdd, ansRLAdd), Math.max(ansLR, ansRL)));
    }

    private String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String str = in.readLine();
            if (str == null) return null;
            st = new StringTokenizer(str);
        }
        return st.nextToken();
    }

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }


    private double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }


    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    private void close() {
        out.close();
    }

    private void open() {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }
}