import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class D651 {

    public static final int WATCH_COST = 1;
    private static int swipeCost;
    private static int rotateCost;
    private static int totalTime;
    private static boolean[] needsRotate;
    private static int photoCount;

    public static void main(String[] args) throws IOException {
        ContestsScanner sc = new ContestsScanner();
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        photoCount = sc.nextInt();
        swipeCost = sc.nextInt();
        rotateCost = sc.nextInt();
        totalTime = sc.nextInt();
        needsRotate = readRotates(sc);
        int result = solve();
        reverseArray(needsRotate);
        shiftRight(needsRotate);
        out.println(Math.max(result, solve()));
        out.close();
    }

    private static void shiftRight(boolean[] t) {
        boolean prev = t[t.length - 1];
        for (int i = 0; i < t.length; i++) {
            boolean tmp = t[i];
            t[i] = prev;
            prev = tmp;
        }
    }

    private static void reverseArray(boolean[] t) {
        int a = 0, b = t.length - 1;
        while (a < b) {
            boolean tmp = t[a];
            t[a] = t[b];
            t[b] = tmp;
            a++;
            b--;
        }
    }

    private static int solve() {
        int[] endCosts = calcEndCosts();
        int moveLeftIndex = 0;
        while (moveLeftIndex < photoCount && endCosts[moveLeftIndex] > totalTime) {
            moveLeftIndex++;
        }
        int bestResult = 0;
        int rightCost = 0;
        for (int rightUntil = 0; rightUntil < photoCount; rightUntil++) {
            if (needsRotate[rightUntil]) {
                rightCost += rotateCost;
            }
            rightCost += WATCH_COST;
            if (rightCost > totalTime) {
                break;
            }
            if (moveLeftIndex <= rightUntil) {
                moveLeftIndex = rightUntil + 1;
            }
            long rightAndBack = rightCost + (rightUntil + 1) * swipeCost;
            while (moveLeftIndex < photoCount && rightAndBack + endCosts[moveLeftIndex] > totalTime) {
                moveLeftIndex++;
            }
            int currentResult = rightUntil + 1 + photoCount - moveLeftIndex;
            bestResult = Math.max(bestResult, currentResult);

            rightCost += swipeCost;
        }
        return bestResult;
    }

    private static int[] calcEndCosts() {
        int[] result = new int[photoCount];
        Arrays.fill(result, totalTime + 1);
        int currentCost = 0;
        for (int i = photoCount - 1; i >= 0; i--) {
            if (needsRotate[i]) {
                currentCost += rotateCost;
            }
            currentCost += WATCH_COST;
            result[i] = currentCost;
            currentCost += swipeCost;
            if (currentCost > totalTime) {
                break;
            }
        }
        return result;
    }

    private static boolean[] readRotates(ContestsScanner sc) {
        String photos = sc.nextLine();
        boolean[] result = new boolean[photos.length()];
        for (int i = 0; i < photos.length(); i++) {
            result[i] = photos.charAt(i) == 'w';
        }
        return result;
    }

    public static class ContestsScanner {

        private final BufferedReader br;
        private StringTokenizer tokenizer;

        public ContestsScanner() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = new StringTokenizer(br.readLine());
        }

        String nextToken() {
            if (!tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        String nextLine() {
            if (tokenizer.hasMoreTokens()) {
                return tokenizer.nextToken("\n");
            } else {
                try {
                    return br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return "";
        }

        int nextInt() {
            return Integer.valueOf(nextToken());
        }
    }
}