import java.util.*;
import java.io.*;

public class Main {
	public static void main(String [] args){
		Scanner in = new Scanner(System.in);
		
		int photoNum = in.nextInt();
		int moveTime = in.nextInt();
		int changeTime = in.nextInt();
		int avlTime = in.nextInt();
		String orientation = in.next();
		
		int first = 1;
		if (orientation.charAt(0) == 'w'){
			first += changeTime;
		}
		
		int [] timeSeq = new int [orientation.length()];
		for (int i=1; i<orientation.length(); i++){
			timeSeq[i] += timeSeq[i-1];
			timeSeq[i] += moveTime+1;
			if (orientation.charAt(i) == 'w'){
				timeSeq[i] += changeTime;
			}
			//System.out.print(timeSeq[i]+" ");
		}
		//System.out.println();
		
		
		int [] revTimeSeq = new int [orientation.length()];
		int counter = 1;
		for (int i=orientation.length()-1; i>=1; i--){
			revTimeSeq[counter] += revTimeSeq[counter-1];
			revTimeSeq[counter] += moveTime+1;
			if (orientation.charAt(i) == 'w'){
				revTimeSeq[counter] += changeTime;
			}
			//System.out.print(revTimeSeq[counter]+" ");
			counter++;
		}
		//System.out.println();
		
		int max = 0;
		int endpoint = Arrays.binarySearch(timeSeq, avlTime-first);
		if (endpoint < 0){
			endpoint = (endpoint+1)*(-1);
			if (endpoint == timeSeq.length){
				max = timeSeq.length;
			}
		}else{
			max = endpoint+1;
			//System.out.println("1");
		}
		
		int revEndpoint = Arrays.binarySearch(revTimeSeq, avlTime-first);
		if (revEndpoint < 0){
			revEndpoint = (revEndpoint+1)*(-1);
			if (revEndpoint == revTimeSeq.length && max < revEndpoint){
				max = revTimeSeq.length;
			}
		}else if (revEndpoint > max){
			max = revEndpoint+1;
			//System.out.println("2");
		}
		
		//System.out.println(max+" "+endpoint+" "+revEndpoint);
		if (max < timeSeq.length){
				for (int i=endpoint-1; i>=1; i--){
					int tmp = Arrays.binarySearch(revTimeSeq, 1, revTimeSeq.length-1-i, (avlTime-first-timeSeq[i]-i*moveTime));
					if (revTimeSeq.length-i-1<1){
						continue;
					}
					if (tmp < 0){
						tmp = (tmp+1)*(-1)-1 ;
					}
					
					//System.out.println(tmp+" "+i);
					if (max < tmp+i+1){
						max = tmp+i+1;
						//System.out.println("right "+tmp+" "+i);
					}
				}
				
				for (int i=revEndpoint-1; i>=1; i--){
					if (timeSeq.length-i-1<1){
						continue;
					}
					int tmp = Arrays.binarySearch(timeSeq, 1, timeSeq.length-1-i, (avlTime-first-revTimeSeq[i]-i*moveTime));
					if (tmp < 0){
						tmp = (tmp+1)*(-1)-1 ;
					}
					
					//System.out.println(tmp+" "+i);
					if (max < tmp+i+1){
						max = tmp+i+1;
						//System.out.println("left "+tmp+" "+i);
					}
				}
		}
		
		
		System.out.println(max);
	}
}

			 	 			   	   		  		   		 	