import java.io.*;
import java.util.*;
import java.math.*;
 
public class Main {


    public int cost(char c){

        if(c == 'w'){
            return 1 + b;
        }else{ 
            return 1;
        }

    }

    int n, a, b, t;

    public void solve() throws IOException{

        
        n = in.nextInt();
        a = in.nextInt();
        b = in.nextInt();
        t = in.nextInt();
        char[] str = in.next().toCharArray();

        int cum = cost(str[0]);
        if(cum > t){
            out.println(0);
            return;
        }
        int res = 1;
        int l = n - 1;
        int r = 0;

        // move to the right as much as possible;

        while(r != n - 1 && cum + a + cost(str[r + 1]) <= t){

            cum += a + cost(str[r + 1]);
            r++;
            res = Math.max(res, r + 1);
        }


        //out.println(r);
        //out.println(cum);

        // if we can loop around, don't need to check further
        if(r == n - 1 && cum <= t){
            out.println(n);
            return;
        }

        while(r >= 0){

            //out.println("l " + l + " r " + r);

            if(cum + cost(str[l]) + a + r * a > t){
                
                cum -= a + cost(str[r]);
                r--;
            
            }else{
                cum += a + cost(str[l]);
                res = Math.max(res, r + 1 + (n - l));
                l--;
            }

        }

        out.println(res);


    }
    
    public BigInteger gcdBigInt(BigInteger a, BigInteger b){

        if(a.compareTo(BigInteger.valueOf(0L)) == 0){
            return b;
        }else{
            return gcdBigInt(b.mod(a), a);
        }

    }

 
    FastScanner in;
    PrintWriter out;
 
    static class FastScanner {
 
        BufferedReader br;
        StringTokenizer st;
 
        FastScanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            st = null;
        }
 
        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
 
        String nextLine() throws IOException {
            if (st == null || !st.hasMoreTokens())
                return br.readLine();
            StringBuilder result = new StringBuilder(st.nextToken());
            while (st.hasMoreTokens()) {
                result.append(" ");
                result.append(st.nextToken());
            }
            return result.toString();
        }
 
        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 run() throws IOException {
        in = new FastScanner(System.in);
        out = new PrintWriter(System.out, false);
        solve();
        out.close();
    }
 
    public static void main(String[] args) throws IOException{
        new Main().run();
    }
 
    public void printArr(int[] arr){
        for(int i = 0; i < arr.length; i++){
            out.print(arr[i] + " ");
        }
        out.println();
    }
 
    public long gcd(long a, long b){
        if(a == 0) return b;
        return gcd(b % a, a);
    }

    public boolean isPrime(long num){

        if(num == 0 || num == 1){
            return false;
        }

        for(int i = 2; i * i <= num; i++){
            if(num % i == 0){
                return false;
            }
        }

        return true;
    }

    public class Pair<A, B>{
        public A x; 
        public B y;

        Pair(A x, B y){
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Pair<?, ?> pair = (Pair<?, ?>) o;
            if (!x.equals(pair.x)) return false;
            return y.equals(pair.y);
        }

        @Override
        public int hashCode() {
            int result = x.hashCode();
            result = 31 * result + y.hashCode();
            return result;
        }

    }

    class Tuple{
        int x; int y; int z;
        Tuple(int ix, int iy, int iz){
            x = ix;
            y = iy;
            z = iz;
        }
    }
}
