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

public class Image{
	
	public static void main (String args[]){
		
		Scanner ler = new Scanner(System.in);
		int numImagens = ler.nextInt();
		int timeMove = ler.nextInt();
		int timeOrientation = ler.nextInt();
		int timeToWatch = ler.nextInt();
		int qtdImagem = 0,tempoDecorrido = 0;
		ler.nextLine();
		String moves = ler.nextLine();
		
		for (int i = 0; i < moves.length() && tempoDecorrido <= timeToWatch ;i++){
			if(i == 0 && moves.charAt(i) == 'w'){
				tempoDecorrido += timeOrientation;
				if(tempoDecorrido > timeToWatch){
					break;
				}else{
					tempoDecorrido += 1;
				}
			}else if(moves.charAt(i) == 'h'){
				tempoDecorrido += 1;
			}else if(moves.charAt(i) == 'w'){
				tempoDecorrido +=timeOrientation;
				if(tempoDecorrido > timeToWatch){
					break;
				}else{
					tempoDecorrido += 1;
				}
			}
			tempoDecorrido += timeMove;
			qtdImagem++;
		}
		System.out.println(qtdImagem);
	}
	
}