
// ~/BAU/ACM-ICPC/Teams/A++/BlackBurn95
// ~/sudo apt-get Accpeted

import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;
        
        tk = new StringTokenizer(in.readLine());
        int n = parseInt(tk.nextToken()),a = parseInt(tk.nextToken()),b = parseInt(tk.nextToken()),t = parseInt(tk.nextToken());
        String s = in.readLine();
        
        long [] dp = new long[n];
        dp[0] = 1 + (s.charAt(0)=='w' ? b : 0);
        for(int i=1; i<n; i++)
            dp[i] = 1+a+(s.charAt(i)=='w' ? b : 0);
        
        long [] A = new long[n];
        A[0] = dp[0];
        for(int i=1; i<n; i++)
            A[i] = A[i-1]+dp[i];
        long [] B = new long[n];
        B[n-1] = dp[n-1];
        for(int i=n-2; i>=0; i--)
            B[i] = B[i+1]+dp[i];
        
        int mx = 0;
        
        for(int i=0; i<n; i++) {
            if(A[i] <= t) mx = max(mx,i+1);
            if(A[i]+i*a <= t) {
                long x = t-i*a-A[i];
                
                int l=i+1,r=n-1,m,y=-1;
                
                while(l <= r) {
                    m = (l+r)/2;
                    
                    if(B[m] <= x) {
                        y = m;
                        r = m-1;
                    } else l = m+1;
                }
                
                if(y!=-1) mx = max(mx, i+1+n-1-y+1);
            }
        }
        
        for(int i=n-1; i>=0; i--) {
            long x = B[i]+1+(s.charAt(0)=='w' ? b : 0);
            
            if(x <= t && i>0) mx = max(mx, n-1-i+1+1);
            
            x += (n-1-i+1)*a;
            
            if(x <= t) {
                int l=0,r=n-1,m,y=-1;
                
                while(l <= r) {
                    m = (l+r)/2;
                    
                    if(x+A[m]-1 <= t) {
                        y = m;
                        l = m+1;
                    } else r = m-1;
                }
                
                if(y != -1 && y < i) mx = max(mx, n-1-i+1+y+1);
            }
        }
        
        System.out.println(mx);
    }
   
}