import java.util.*;
import java.io.*;
import java.math.*;


import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;


public class Main{ 


    static long mod=1000000007;
    //  static int dx[]={1,-1,0,0};
    // static int dy[]={0,0,1,-1};
  //  static int dx[]={1,-1,0,0,1,1,-1,-1};
    //static int dy[]={0,0,1,-1,1,-1,1,-1}; 

public  static void main(String[] args)   throws Exception, IOException{

    
    Reader sc = new Reader(System.in);
    PrintWriter out=new PrintWriter(System.out);

    int n=sc.nextInt(),a=sc.nextInt(),b=sc.nextInt(),T=sc.nextInt();
    char c[]=sc.nextString().toCharArray();
    int d[]=new int[n*2];

        d[n]=(  c[0]     =='w'? b:0  ) ;
        d[n-1]=(  c[n-1] =='w'? b:0  ) ;


    for( int i=1; i<n; i++ ){
        d[i+n]=(  c[i]=='w'? b:0  ) + d[i+n-1];
        d[-i+n-1]=(  c[n-i-1]=='w'? b:0  ) + d[-i+n];
    }

    int r=0;
   // db(c,d,mx);

    for( int i=n; 0<i; i-- ){
       int dw=n,hi=2*n,md; long s;
       int us=n-i;
       for( int t=0; t<60; t++ ){   
        md=dw+hi>>1;
        s=d[md]+d[i]+(long)(max(us,md-n)+min(us,md-n)*2  )*a+md-i+1;
        if(i==n)s-=d[i];
        //if(i==6)db(i,md,us,d[i],s);

        if(s<=T){   dw=md; r=max(r, md-i+1 ); } 
        else hi=md;
        //db(i,t,dw,hi,s,md);
       } 
     //  db(i,r);
    }
r=min(r,n);

    out.println(r);
    out.flush();
}



 static long gcd(long a, long b){
                 if(min(a,b) == 0) return max(a,b);
                 return gcd(max(a, b) % min(a,b), min(a,b));
         }


static void db(Object... os){

    System.err.println(Arrays.deepToString(os));

}

static boolean validpos(int x,int y,int r, int c){
    
    return x<r && 0<=x && y<c && 0<=y;
    
}
 
static boolean bit(long x,int k){
    // weather k-th bit (from right) be one or zero
    return  ( 0 < ( (x>>k) & 1 )  )  ? true:false;
}

}





class Reader
{ 
    private BufferedReader x;
    private StringTokenizer st;
    
    public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    }
    public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    }
}

