/* Programming Competition - Template (Horatiu Lazu) */

import java.io.*;
import java.util.*;
import java.lang.*;
import java.awt.*;
import java.awt.geom.*;
import java.math.*;
import java.text.*;


public class Imaging{
	BufferedReader in;
	StringTokenizer st;
	
	public static void main (String [] args){
		new Imaging();
	}

	public Imaging(){
		try{
			in = new BufferedReader(new InputStreamReader(System.in));
			
			int N = nextInt();
			int A = nextInt();
			int B = nextInt();
			int T = nextInt();
			int best = 0;
			int cost = 0;
			char [] arr = new char[N];
			String input = next();
			for(int x = 0; x < N; x++)
				arr[x] = input.charAt(x);
			
			int low = 0;
			int high = 0;
			if (arr[0] == 'w'){
				if (A+1+B > T){
					System.out.println(0);
					return;	
				}	
				else
					cost += A+1+B;
			}
			else{
				if (A+1 > T){
					System.out.println(0);	
				}	
				else
					cost += A+1;
			}
			best++;
			
			for(int x = 1; x < N; x++){ //find right position (MAX)... O(N) <-- Linear
				if (arr[x] == 'w'){
					if (cost + B + A +1 <= T){
						//System.out.println("HERE" + x);
						cost += B+A+1;
						high = x;
						best++;
					}	
					else
						break;
				}
				else if (arr[x] == 'h'){
					if (cost + A +1 <= T){
						//System.out.println("HERE2" + x);
						cost += A +1;
						high = x;	
						best++;
					}
					else
						break;
				}
			}
			if (high == N-1){
				System.out.println(N);
				return;	
			}
			int current = best;
			for(int y = N-1; y > 0; y--){ //go from left to right .. decrease x while decreasing y. stop when x = 0
				current++;
				if (arr[y] == 'w'){
					cost += A+B+1;	
				}
				else
					cost += A+1;
				while(cost > T){
					high--;
					current--;
					if (high < 0){
						//System.out.println("x < 0!" + y);
						y = -1;
						break;
					}
					cost -= ((arr[high+1] == 'w') ? (A+B) : (A)) +1;
					
				}
				best = Math.max(best, current);
			}
			System.out.println(best);
			
		}
		catch(IOException e){
			System.out.println("IO: General");
		}
	}
	
	String next() throws IOException {
		while (st == null || !st.hasMoreTokens())
	   	 	st = new StringTokenizer(in.readLine().trim());
		return st.nextToken();
	}

	long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	String nextLine() throws IOException {
		return in.readLine().trim();
	}
}