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;//=nedsw StringTokenizer(br.readLine());
        //////////////////////////////////////////////////////////////////////////////////////
        
        int n=ni(),a=ni(),b=ni(),t=ni();
        String s=("*"+ns());
        int arr1[]=new int[n+2];
        int arr2[]=new int[n+2];
        int arr3[]=new int[n+2];
        for(int i=1;i<=n;i++)
        {
            int temp=0;
            if(s.charAt(i)=='w')temp+=b;
            temp++;
            if(i!=1)
                temp+=a;
            arr1[i]=temp;
        }
        for(int i=1;i<=n;i++)
            arr2[i]=arr2[i-1]+arr1[i];
        for(int i=n;i>=0;i--)
            arr3[i]=arr3[i+1]+arr1[i];
        int ans=0;
        for(int i=1;i<=n;i++)
        {
            if(arr2[i]<=t)
            {
                int l=i+1;
                int r=n+1;
                int mid=0;
                int time=arr2[i]+(a*(i-1));
                int max=i;
                while(l<r)
                {
                    mid=(l+r)/2;
                    if(arr3[mid]+time<=t)
                    {
                        max=i+n-mid+1;
                        r=mid;
                    }
                    else l=mid+1;
                }
                ans=Math.max(ans,max);
            }
            else break;
        }
        for(int i=n;i>=1;i--)
        {
            if(arr3[i]<=t)
            {
                int l=1;
                int r=i-1;
                int time=arr3[i]+(a*(n-i+1));
                int max=0;
                while(l<r)
                {
                    int mid=(l+r)/2;
                    if(arr2[mid]+time<=t)
                    {
                        max=n-i+1+mid;
                        l=mid+1;
                    }  
                    else r=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();
    }
}