import java.io.*;
import java.util.*;
public class B650 
{
    static int n,a,b,t;
    static List<Integer> list;
    static int find(String s)
    {
        list=new ArrayList<>();
        for(int i=n-1;i>=0;i--)
        {
            if(i==n-1)
            {
                if(s.charAt(i)=='w')
                    list.add(a+b+1);
                else
                    list.add(a+1);
            }
            else
            {
                if(s.charAt(i)=='w')
                    list.add(list.get(n-2-i)+a+b+1);
                else
                    list.add(list.get(n-2-i)+a+1);
            }
        }
        //System.out.println(list);
        int sum=1,i=0,max=0;
            if(s.charAt(0)=='w')
                sum=b+1;
            while(i<n)
            {
                if(i>0)
                {
                    if(s.charAt(i)=='w')
                    {
                        if(sum+a+b+1 <=t)
                        {
                            sum+=a+b+1;
                        }
                        else
                            break;
                    }
                    else
                    {
                        if(sum+a+1 <=t)
                        {
                            sum+=a+1;
                        }
                        else
                            break;
                    }
                }
                int rem=t-sum-i*a;
                
                int ind=Collections.binarySearch(list,rem);
                if(ind<0)
                    ind=ind*-1 -2;
                if(ind==-1)
                    max=Math.max(max,i+1);
                else
                {
                    if(ind==n-1)
                        max=n;
                    else
                    {
                        max=Math.max(max,Math.min(n,i+1+ind+1));
                    }
                }
                //System.out.println(rem+" "+i+" "+ind);
                i++;
            }
            return max;
    }
    public static void main(String args[])throws IOException
    {
        Scanner sc=new Scanner(System.in);
        n=sc.nextInt();
        a =sc.nextInt();
        b=sc.nextInt();
        t=sc.nextInt();
        String s=sc.next();
        
        if(s.charAt(0)=='w' && t<b+1)
            System.out.println(0);
        else
        {
            StringBuffer sb=new StringBuffer("");
            sb.append(s.charAt(0));
            for(int i=n-1;i>0;i--)
            {
                sb.append(s.charAt(i));
            }
            //System.out.println(sb);
            int max=find(s);
            //System.out.println(max+" "+sb);
            System.out.println(Math.max(max,find(sb.toString())));
        }
    }
}