import java.util.Arrays;
import java.util.Scanner;


public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		int a = scan.nextInt();
		int b = scan.nextInt();
		int T = scan.nextInt();
		boolean r[] = new boolean[n];
		
		char c[]= scan.next().toCharArray();
		
		for(int i=0;i<n;i++){
			if(c[i]=='w')
				r[i] = true;
			else
				r[i] = false;
		}
		
		int tr[] = new int[n];
		int tl[] = new int[n];
		
		for(int i=1;i<n;i++){
			tr[i] = tr[i-1];
			tl[i] = tl[i-1];
			
			if(r[i])
				tr[i]++;
			if(r[n-i])
				tl[i]++;
		}
		
		int max = 0;
		
		int t = 0;
		
		if(r[0])
			t += b;
		t += 1;
		
		if(t<=T) max = 1;
		
		T -= t;
		
		
		for(int i=0;i<=400&&i<n;i++){
			int j = max - 1 - i;
			if(j<0) j = 0;
			for(;j<n-i;j++){
				t = (a+1)*(i+j) + b * (tl[i]+tr[j]);
				if(i<j)
					t+=a*i;
				else
					t+=a*j;
				if(t<=T){
					if(i+j+1>max) max = i+j+1;
				}else{
					break;
				}
			}
		}
		
		for(int i=0;i<=400&&i<n;i++){
			int j = max - 1 - i;
			if(j<0) j = 0;
			for(;j<n-i;j++){
				t = (a+1)*(i+j) + b * (tl[j]+tr[i]);
				if(i<j)
					t+=a*i;
				else
					t+=a*j;
				if(t<=T){
					if(i+j+1>max) max = i+j+1;
				}else{
					break;
				}
			}
		}
		
		
		System.out.println(max);
		
	}
}

	    	    		  			 	 		    			 	