import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main {

    private static InputStream inputStream;
    private static OutputStream outputStream;
    private static PrintWriter writer;
    private static InputReader reader;

    public static void main(String[] args) {
        inputStream = System.in;
        outputStream = System.out;
        reader = new InputReader(inputStream);
        writer = new PrintWriter(outputStream);
        new Main().main();
        writer.close();
    }

    public static final int MAX_VALUE = (int) (1e9 + 1e8);

    private void main() {
        int n, a, b, T, len;
        n = reader.nextInt();
        a = reader.nextInt();
        b = reader.nextInt();
        T = reader.nextInt();
        String string = reader.next();
        len = n + 1;
        int[] s = new int[len];
        int[] traverseCost = new int[len];
        int[] reverseCost = new int[len];
        for (int i = 0; i < n; ++i) {
            if (string.charAt(i) == 'w') {
                s[i] = 1;
            } else {
                s[i] = 0;
            }
        }
        traverseCost[0] = 1 + s[0] * b;
        int ans = 0;
        for (int i = 1; i < n; ++i) {
            traverseCost[i] = traverseCost[i - 1] + s[i] * b + a + 1;
            if (traverseCost[i] > T) {
                traverseCost[i] = MAX_VALUE;
            }
        }

        for (int i = n - 1; i >= 0; --i) {
            reverseCost[i] = reverseCost[i + 1] + s[i] * b + a + 1;
            if (reverseCost[i] > T) {
                reverseCost[i] = MAX_VALUE;
            }
        }
//        for (int i = 0; i < n; ++i) {
//            writer.println(traverseCost[i] + " " + reverseCost[i]);
//        }
        int l = 0, r = 1;
        while (l < r && r <= n) {
            int extraCost = Math.min(l, n - r) * a;
            if (traverseCost[l] + reverseCost[r] + extraCost <= T) {
                ans = Math.max(ans, n - r + l + 1);
                if (l + 1 < r) {
                    ++l;
                } else {
                    break;
                }
            } else {
                if (r < n) {
                    ++r;
                } else {
                    break;
                }
            }
        }
        writer.println(ans);
    }

    int put(HashMap<Integer, Integer> hashMap, int x) {
        int k = 0;
        if (hashMap.containsKey(x)) {
            k = hashMap.get(x);
        }
        hashMap.put(x, 1 + k);
        return k;
    }


}


class InputReader {
    private StringTokenizer tokenizer;
    private BufferedReader reader;

    public InputReader(InputStream inputStream) {
        tokenizer = null;
        reader = new BufferedReader(new InputStreamReader(inputStream));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}