import java.util.Scanner;


public class D1650B {

	static int N=0;
	static int a=0;
	static int b=0;
	static int T=0;
	static char[] S;
	
	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		String in = s.nextLine();
		String[] inarr = in.split(" ");
		N = Integer.parseInt(inarr[0]);
		a = Integer.parseInt(inarr[1]);
		b = Integer.parseInt(inarr[2]);
		T = Integer.parseInt(inarr[3]);
		String qa = s.nextLine();
		S = qa.toCharArray();
		
		int right = findMin();
		for(int i = 1; i <= S.length/2; i++){			
			char temp = S[i];
			S[i] = S[N-i];
			S[N-i]=temp;
		}
		int left = findMin();
		System.out.println(Math.max(right, left));
	}
	
	public static int findMin(){
		
		int i = -1; int t = T;
		while(i < N-1){
			
			i++;
			int sum = 1;
			if(i != 0)sum += a;
			if(S[i] == 'w')sum +=b;
			if(t < sum)break;
			t -= sum;
		}
		if(i==0)return 0;
		int j = -1;
		while(N-1-j >= i){
			
			j++;
			int sum = 1+a;
			if(j == 0)sum += a*(i-1);
			if(S[N-1-j] == 'w')sum +=b;
			if(t < sum)break;
			t-= sum;
		}
		int ret = i+j;
		while(i > 1){
		
			i--;
			t += a+1;
			if(j !=0)t += a;
			if(S[i]== 'w')t+=b;
			for(;N-j-1>=i; j++){
				int sum = 1+a;
				if(j == 0)sum += a*(i-1);
				if(S[N-1-j] == 'w')sum +=b;
				if(t < sum)break;
				t-= sum;
			}
			ret = Math.max(ret, i+j);
		}
		return ret;
	}

}
