import java.io.*;
import java.util.*;
import java.lang.*;
import java.math.BigInteger;
import java.util.Map.Entry;
import java.util.logging.Level;
import java.util.logging.Logger;


public class Main
{
    static StringTokenizer st=new StringTokenizer("");
    static BufferedReader br;
    
    ///////////////////////////////////////////////////////////////////////////////////
    
   
    public static void main(String args[]) throws FileNotFoundException, IOException, Exception
    {
        //Scanner class
        //Scanner in =new Scanner(new FileReader("input.txt"));
        //Scanner in=new Scanner(System.in);
        
        //PrintWriter out = new PrintWriter(new FileWriter("output.txt"));
        //br=new BufferedReader(new FileReader("input.txt"));
        
        br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out=new PrintWriter(System.out);
        
        //StringTokenizer st;//=new StringTokenizer(br.readLine());
        //////////////////////////////////////////////////////////////////////////////////////
        
        int n=ni(),a=ni(),b=ni(),t=ni();
        char ch[]=("$"+ns()).toCharArray();
        long pre[]=new long[n+2];
        for(int i=1;i<=n;i++)
        {
            long temp=0;
            if(ch[i]=='w')
                temp+=b;
            temp++;
            if(i>1)
                temp+=a;
            pre[i]=pre[i-1]+temp;
        }
        long post[]=new long[n+2];
        for(int i=n;i>=1;i--)
        {
            long temp=0;
            if(ch[i]=='w') temp+=b;
            temp++;
            temp+=a;
            post[i]=post[i+1]+temp;
        }
        int ans=0;
        for(int i=1;i<=n;i++)
        {
            if(pre[i]<=t)
            {
                int start=i+1;
                int end=n+1;
                long time=pre[i]+(long)(i-1)*a;
                int max=i;
                while(start<end)
                {
                    int mid=(start+end)/2;
                    if(post[mid]+time<=t) 
                    {
                        max=i+n-mid+1;
                        end=mid;
                    }
                    else start=mid+1;
                }
                ans=Math.max(ans,max);
            }
            else break;
        }
        for(int i=n;i>=1;i--)
        {
            if(post[i]<=t)
            {
                int start=1,end=i;
                int max=-1;
                long time=post[i]+(long)(n-i+1)*a;
                while(start<end)
                {
                    int mid=(start+end)/2;
                    if(pre[mid]+time<=t)
                    {
                        max=mid+n-i+1;
                        start=mid+1;
                    }
                    else end=mid;
                }
                ans=Math.max(ans,max);
            }
            else break;
        }
        out.print(ans);
        //////////////////////////////////////////////////////////////////////////////////////
	out.close();
    }
    
    
    
    
    ///////////////////////////////////////////////////////////////////////////////
    
    private static long gcd(long a,long b)
    {
        if(b==0)
            return a;
        return gcd(b,a%b);
    }
    private static class pair implements Comparable<pair>
    {
        int first;
        int second;
        pair()
        {
            first=0;
            second=0;
        }
        pair(int f,int s)
        {
            first=f;
            second=s;
        }

        public int compareTo(pair o)
        {
            if(first+second >  o.first+o.second)
                return 1;
            else if(first+second < o.first+o.second)
                return -1;
            else
                return 0;
        }
    }
    
    public static Integer ni() throws Exception
    {
        if(!st.hasMoreTokens())
            st=new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }
    public static BigInteger nb()throws Exception
    {
        if(!st.hasMoreElements())
            st=new StringTokenizer(br.readLine());
        return BigInteger.valueOf(Long.parseLong(st.nextToken()));
    }
    public static Long nl() throws Exception
    {
        if(!st.hasMoreTokens())
            st=new StringTokenizer(br.readLine());
        return Long.parseLong(st.nextToken());
    }
    public static Double nd()throws Exception
    {
        if(!st.hasMoreElements())
            st=new StringTokenizer(br.readLine());
        return Double.parseDouble(st.nextToken());
    }
    public static String ns()throws Exception
    {
        if(!st.hasMoreElements())
            st=new StringTokenizer(br.readLine());
        return st.nextToken();
    }
}