import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;

public class Main {
    static Reader in = null;
    static PrintWriter out = null;

    static void solve() throws IOException {
        int n = in.nextInt();
        int a = in.nextInt();
        int b = in.nextInt();
        int t = in.nextInt();
        char[] o = in.nextLine().toCharArray();

        long[] costA = new long[n];
        long[] costB = new long[n];
        int initCost = (o[0] == 'w') ? b+1 : 1;

        if(initCost > t) {
            out.println(0);
            return;
        }

        costA[0] = costB[0] = initCost;
        for(int i=1; i<n; i++) {
            costA[i] = costA[i-1] + a + ((o[i] == 'w') ? b+1 : 1);
            costB[i] = costB[i-1] + a + ((o[n-i] == 'w') ? b+1 : 1);
        }

        int ans = 0;
        for(int i=0; i<n; i++) {
            long r = Math.max(initCost, t + initCost - (costB[i] + (i * a)));
            int s = 0, e = n-1, x = -1;
            while(s <= e) {
                int m = (s+e)/2;
                if(costA[m] <= r) {
                    x = m;
                    s = m+1;
                }
                else e = m-1;
            }
            if(costB[i] <= t) ans = Math.max(ans, i+x+1);

            r = Math.max(initCost, t + initCost - (costA[i] + (i * a)));
            s = 0; e = n-1; x = -1;
            while(s <= e) {
                int m = (s+e)/2;
                if(costB[m] <= r) {
                    x = m;
                    s = m+1;
                }
                else e = m-1;
            }
            if(costA[i] <= t) ans = Math.max(ans, i+x+1);
        }
        if(ans > n) ans = n;
        out.println(ans);
    }

    public static void main(String[] args) {
        try {
            OutputStreamWriter osw = new OutputStreamWriter(System.out);
            BufferedWriter bw = new BufferedWriter(osw);
            in = new Reader();
            out = new PrintWriter(bw);

            solve();

            out.close();
            bw.close();
            osw.close();
            in.close();
        }
        catch (IOException e) {
            e.printStackTrace();
        }
    }

    static class Reader {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        StringTokenizer tk = new StringTokenizer("");
        String s = null;

        String nextLine() throws IOException {
            while((s = br.readLine()) != null && s.length() == 0);
            return s;
        }
        String next() throws IOException {
            if(!tk.hasMoreTokens()) tk = new StringTokenizer(nextLine());
            return tk.nextToken();
        }
        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
        long nextLong() throws IOException {
            return Long.parseLong(next());
        }
        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
        void close() throws  IOException {
            br.close();
            isr.close();
        }
    }
}
