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 arr[]=new int[n];
        for(int i=0;i<n;i++)
        {
            int temp=0;
            if(s.charAt(i)=='w')temp+=b;
            temp++;temp+=a;
            arr[i]=temp;
        }
        int[] pre =new int[n];
        int[] post=new int[n];
        pre[0]=arr[0];
        for(int i=1;i<n;i++) pre[i]=pre[i-1]+arr[i];
        post[n-1]=arr[n-1];
        for(int i=n-2;i>=0;i--) post[i]=arr[i]+post[i+1];
        boolean used[]=new boolean[n];
        int ans=0;
        int time=-a;
        int no=0;
        int i=0;
        for(;i<n;i++)
        {
            if(time+pre[i]<=t)
            {
                time+=pre[i];
                no++;
                used[i]=true;
            }
            else break;
        }
        if(i==n)
        {
            out.print(n);
            out.close();
            return ;
        }
        if(used[0])
        i--;
        int j=n-1;
        ans=no;
        for(;j>=0;j--)
        {
            if(time+arr[j]+(a*(i-1))<=t)
            {
                no++;
                ans=Math.max(ans,no);
                time+=arr[j];
                used[j]=true;
            }
            else if(time>=0)
            {
                while(time+arr[j]+(a*(i-1))>t && i>=0)
                {
                    time-=arr[i];
                    i--;
                    no--;
                }
            }
            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();
    }
}