import java.util.Scanner;

public class test{
	static int n, a, b, t;
	static char[] orientations;

	static int viewed = 0;
	static int time = 0;
	static boolean vertical = true;
	static int current = 0;

	public static void view(){


		if(orientations[current] != 'a'){
			viewed++;
			time += 1;
			orientations[current] = 'a';
		}

		current++;
		time += a;
	}

	public static void rotate(){
		vertical = !vertical;
		time += b;	
	}
	
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		n = s.nextInt();
		a = s.nextInt();//to swipe
		b = s.nextInt();//to rotate
		t = s.nextInt();//max time
		String o = s.next();
		orientations = new char[n];
		orientations = o.toCharArray();

		while(time < t){
			current = current % orientations.length;
			// Check if you need to rotate to view	
			if((orientations[current] == 'h' && vertical)
				|| (orientations[current] == 'w' && !vertical)){
				view();
			}else{
				rotate();
				if(time >= t)continue;
				view();
			}	
		}		
		System.out.println(viewed);

	}
}







