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

public class ImagePreview{
	public static void main(String args[]) throws FileNotFoundException{
		int numOfPhotos, // number of photo
		timeToSwipe, // to move to adjacent photo
		timeToChangeOri, // time to change orientation of photo
		elapsedTime, t, maxTime, // max time
		num = 0; // number of images Vysya can see
		String ori = new String(); // orientations
		Scanner in;
		
		if(false){
			FileReader fin = new FileReader("E:\\Java\\cf\\in1.txt");
			in = new Scanner(fin);
		}else{
			in = new Scanner(System.in);
		}
		
		numOfPhotos     = in.nextInt();
		timeToSwipe     = in.nextInt();
		timeToChangeOri = in.nextInt();
		maxTime         = in.nextInt();
		ori = in.next();
		
		elapsedTime = t = 0;
		for(int i = 0; i < numOfPhotos; i++){
			if(i != 0)
				t = timeToSwipe;
			else t = 0;
			
			if(ori.charAt(i) == 'w')
				t += timeToChangeOri;
			t++; // adding time to observe
			
			if(t + elapsedTime > maxTime) break;
			else{
				elapsedTime += t;
				num++;
			}
		}
		
		System.out.println(num);
	}
}