import java.util.*;
public class ProD {
	static int n,a,b,T,ans,l,r,mid,res,tt;
	static String ss;
	static char[] s;
	static int[] aa=new int[500005];
	static int[] bb=new int[500005];

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		n=in.nextInt();a=in.nextInt();
		b=in.nextInt();T=in.nextInt();
		ss=" "+in.next();s=ss.toCharArray();
		for(int i=1;i<=n;i++)
		{
			aa[i]=aa[i-1]+1+((s[i]=='w')?b:0);
			if(i>1) aa[i]+=a;
		}
		for(int i=1;i<=n;i++)
		{
			bb[i]=bb[i-1]+1+((s[n-i+1]=='w')?b:0);
			bb[i]+=a;
		}
		for(int i=1;i<=n;i++)
		{
			tt=T-aa[i];
			if(tt<0) continue;
			tt-=(i-1)*a;
			l=0;r=n;res=0;
			while(l<=r)
			{
				mid=(l+r)/2;
				if(bb[mid]<=tt) { res=mid;l=mid+1;}
				else r=mid-1;
			}
			ans=Math.max(ans,Math.min(n,i+res));
		}
		for(int i=1;i<=n;i++)
		{
			tt=T-bb[i]-aa[1];
			if(tt<0) continue;
			tt+=aa[1]-i*a;
			l=1;r=n;res=0;
			while(l<=r)
			{
				mid=(l+r)/2;
				if(aa[mid]<=tt) { res=mid;l=mid+1;}
				else r=mid-1;
			}
			ans=Math.max(ans,Math.min(n,i+res));
		}
		System.out.println(ans);
	}
}
