import java.io.*;
import java.util.*;
public final class image_preview
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	
	public static void main(String args[]) throws Exception
	{
		int n=sc.nextInt(),k1=sc.nextInt(),k2=sc.nextInt(),t=sc.nextInt();char[] a=sc.next().toCharArray();int cost=(a[0]=='w')?k2+1:1;
		if(t<cost)
		{
			out.println(0);
		}
		else
		{
			t-=cost;long res=1;
			long[] pre1=new long[n+1],pre2=new long[n+1];
			long sum=0;
			for(int i=2;i<=n;i++)
			{
				cost=(a[i-1]=='w')?k2+1:1;
				sum+=cost;
				pre1[i]=sum;
			}
			sum=0;
			for(int i=2,j=n;j>=2;j--,i++)
			{
				cost=(a[j-1]=='w')?k2+1:1;
				sum+=cost;
				pre2[i]=sum;
			}
			if(sum+((n-1)*k1)<=t)
			{
				out.println(n);
			}
			else
			{
				//out.println(Arrays.toString(pre1)+" "+Arrays.toString(pre2));
				for(int i=0;i<=n-2;i++)
				{
					long curr_cost=pre1[1+i]+(i*k1);
					if(curr_cost<=t)
					{
						long now=t-curr_cost;
						int low=0,high=n-1-i;
						while(low<high)
						{
							int mid=(low+high+1)>>1;
							long sc=(mid==0)?0:(i*k1)+(mid*k1),nc=pre2[1+mid]+sc;
							if(nc<=now)
							{
								low=mid;
							}
							else
							{
								high=mid-1;
							}
						}
						res=Math.max(res,low+i+1);
					}
				}
				out.println(res);
			}
		}
		out.close();
	}
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}