
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class D {

	public final static char HORIZONTAL_ORITENTATION = 'w';
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String [] parts = br.readLine().split(" ");
		
		int n = Integer.parseInt(parts[0]);
		int swipeTime = Integer.parseInt(parts[1]);
		int rotateTime = Integer.parseInt(parts[2]);
		int T = Integer.parseInt(parts[3]);
		
		
		String photoOrientaion = br.readLine();
		
		
		int toLeft [] = new int [n];
		int toRight [] = new int [n];
		
		toLeft[0]=1;
		if (photoOrientaion.charAt(0)==HORIZONTAL_ORITENTATION){
			toLeft[0]+=rotateTime;
		}
		for (int i=1;i<n;i++){
			toLeft[i]=toLeft[i-1]+swipeTime+1;
			if (photoOrientaion.charAt(i)==HORIZONTAL_ORITENTATION){
				toLeft[i]+=rotateTime;
			}
		}
		
		
		toRight[0]=toLeft[0];
		toRight[n-1]=toRight[0]+swipeTime+1;
		if (photoOrientaion.charAt(n-1)==HORIZONTAL_ORITENTATION){
			toRight[n-1]+=rotateTime;
		}
		for(int i=n-2;i>0;i--){
			toRight[i]=toRight[i+1]+swipeTime+1;
			if (photoOrientaion.charAt(i) == HORIZONTAL_ORITENTATION){
				toRight[i]+=rotateTime;
			}
		}
		
	
		
		int lastSmallerIndex = n-1;
		while (true){
			if (T>=toRight[lastSmallerIndex]){
				lastSmallerIndex--;
				if (lastSmallerIndex==0 || lastSmallerIndex==-1){
					if (n>1)
						lastSmallerIndex=1;
					else 
						lastSmallerIndex=0;
					
					break;
				}
			}else{
				lastSmallerIndex++;
				if (lastSmallerIndex==n){
					lastSmallerIndex = 0;
				}
				break;
			}
		}
		
		//System.out.println("lastSmallerIndex="+lastSmallerIndex);
		int max = 0;
		for (int i=0;i<n;i++){
			int tek = T;
			tek-=toLeft[i];
			if (tek<0)
				continue;
			
			tek-=i*swipeTime;
			
			while(lastSmallerIndex != n && tek<toRight[lastSmallerIndex]){
				lastSmallerIndex++;
			}
			
			max = Math.max(max, Math.min(n,i+1+(n-lastSmallerIndex)));
		}
		
		//System.out.println("first done  -- tekResult = "+max);
		
		if (n>1){
			lastSmallerIndex = 1;
			while (true){
				if (T >= toLeft[lastSmallerIndex]){
					lastSmallerIndex++;
					if (lastSmallerIndex==n || lastSmallerIndex==n+1){
						if (n>0){
							lastSmallerIndex=n-1;
						}
						else 
							lastSmallerIndex=0;
						break;
					}
				}else{
					lastSmallerIndex--;
					break;
				}
			}
		} else 
			lastSmallerIndex=0;
		
		
		//System.out.println("lastSmallerIndex="+lastSmallerIndex);
		
		for (int i=n-1;i>0;i--){
			int tek = T;
			tek-=toRight[i];
			if (tek<0)
				continue;
			
			tek-=(n-i)*swipeTime;
			
			
			
			while(lastSmallerIndex != 0 && tek<toLeft[lastSmallerIndex]){
				lastSmallerIndex--;
			}
			//System.out.println("lastSamllerIndex in for : "+lastSmallerIndex);
			max = Math.max(max, Math.min(n, lastSmallerIndex+n-i+1));
		}
		
		
		System.out.println(max);
	}
}
