import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Codef{
    public static void main(String[] args) throws IOException{
        BufferedReader vod=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer s=new StringTokenizer(vod.readLine());
        int n=Integer.parseInt(s.nextToken());
        int m=Integer.parseInt(s.nextToken());
        int k=Integer.parseInt(s.nextToken());
        int t=Integer.parseInt(s.nextToken());
        char[] ar=vod.readLine().toCharArray();
        int[] left=new int[n+1];
        int[] right=new int[n+1];
        if (ar[0]=='w'){
            if (k+1>t){
                System.out.print(0);
                return;
            }
            t-=(k+1);
        }
        else{
            t--;
        }
        int x=0;
        Arrays.fill(left,Integer.MAX_VALUE);
        Arrays.fill(right,Integer.MAX_VALUE);
        left[0]=0;
        right[0]=0;
        for (int i=0; i<n-1; i++){
            if (ar[n-i-1]=='w'){
                x+=k;
            }
            x+=(m+1);
            right[i+1]=x;
        }
        x=0;
        for (int i=1; i<n; i++){
            if (ar[i]=='w'){
                x+=k;
            }
            x+=(m+1);
            left[i]=x;
        }
        long max=0;
        for (int i=n-1; i>=0; i--){
            if (right[i]>t){
                continue;
            }
            int index=binarysearch(left,t-right[i],i,m);
            max=Math.max(max,i+index);
        }
        System.out.print(Math.min(n,max+1));
    }
    static int binarysearch(int[] arr,long value,int index,int a){
        int l=0;
        int r=arr.length-1;
        int ans=0;
        while(l<r){
            int mid=(l+r)/2;
            //System.out.println(mid);
            if (arr[mid]+Math.min(mid,index)*a<=value&&arr[mid+1]+Math.min(mid+1,index)*a>value){
                ans=mid;
                break;
            }
            if (arr[mid]+Math.min(mid,index)*a<=value){
                l=mid+1;
            }
            else r=mid-1;
        }
        if (ans==0) return l;
        return ans;
    }
}