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

/**
 * Created by sbabkin on 9/14/2015.
 */
public class SolverD {

    public static void main(String[] args) throws IOException {
        new SolverD().Run();
    }

    BufferedReader br;
    PrintWriter pw;
    StringTokenizer stok;

    private String nextToken() throws IOException {
        while (stok == null || !stok.hasMoreTokens()) {
            stok = new StringTokenizer(br.readLine());
        }
        return stok.nextToken();
    }

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

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

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

    private void Run() throws IOException {
//        br = new BufferedReader(new FileReader("input.txt"));
//        pw = new PrintWriter("output.txt");
        br=new BufferedReader(new InputStreamReader(System.in));
        pw=new PrintWriter(new OutputStreamWriter(System.out));

        solve();
        pw.flush();
        pw.close();
    }

    int n, a, b, t;

    private void solve() throws IOException {
        n = nextInt();
        a = nextInt();
        b = nextInt();
        t = nextInt();
        int[] state = new int[n];
        String str = br.readLine();
        for (int i = 0; i < n; i++) {
            if (str.charAt(i) == 'w') {
                state[i] = 1;
            }
        }
        int result = solveMas(state);
        int[] buf = new int[n];
        buf[0] = state[0];
        for (int i = 1; i < n; i++) {
            buf[i] = state[n - i];
        }
        result = Math.max(solveMas(buf), result);
        pw.println(result);
    }

    private int solveMas(int[] state) {
        int result = 0;
        int curTime;
        int fin = 0;
        curTime = 1 + state[0] * b;
        if (curTime > t) {
            return 0;
        }
        boolean ok = true;
        while (ok && fin < n - 1) {
            int toAdd = a + 1 + state[fin + 1] * b;
            if (curTime + toAdd <= t) {
                curTime += toAdd;
                fin++;
            } else {
                ok = false;
            }
        }
        if (fin >= n-1) {
            return n;
        }

        result = fin + 1;
        int curRes = fin + 1;
        int i1 = n - 1;
        while (fin >= 0 && i1 >= 0) {
            curTime = curTime + a + a + 1 + state[i1] * b;
            i1--;
            curRes++;
            while (fin >= 0 && curTime > t) {
                curTime = curTime - 1 - a - state[fin] * b;
                fin--;
                curRes--;
            }
            if (fin >= 0) {
                result = Math.max(result, curRes);
            }
        }
        return Math.min(result,n);
    }

}
