import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int move = in.nextInt();
            int rotate = in.nextInt();
            int total = in.nextInt();

            int[] ary = new int[N];

            String str = in.next();

            if (str.charAt(0) == 'w') {
                ary[0] = 1 + rotate;
            } else {
                ary[0] = 1;
            }
            for (int i = 1; i < N; i++) {
                if (str.charAt(i) == 'w') {
                    ary[i] = 1 + move + rotate;
                } else {
                    ary[i] = 1 + move;
                }
            }

            if (ary[0] > total) {
                out.println(0);
                return;
            }

            total -= ary[0];

            int leftSize = 0;
            int rightSize = 0;
            int max = 1;

            while (rightSize < N - 1 && total >= ary[rightSize + 1]) {
                rightSize++;
                total -= ary[rightSize];
            }

            if (rightSize == N - 1) {
                out.println(N);
                return;
            }

            while (leftSize < N - 1 && total - Math.min(leftSize + 1, rightSize) * move >= ary[N - leftSize - 1]) {
                leftSize++;
                total -= ary[N - leftSize];
            }

            max = rightSize + 1 + leftSize;

            while (rightSize > 0) {
                total += ary[rightSize];
                rightSize--;
                while (leftSize < N - 1 && total - Math.min(leftSize + 1, rightSize) * move >= ary[N - leftSize - 1]) {
                    leftSize++;
                    total -= ary[N - leftSize];
                }
                max = Math.max(max, 1 + leftSize + rightSize);
            }

            out.println(max);


        }

    }
}

