import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class D {
	
	
	public static void main(String[] args) {

		MyScanner in = new MyScanner();
		int n = in.nextInt();
		int a = in.nextInt();
		int b = in.nextInt();
		int t = in.nextInt();
		
		String photos = in.next();		
		int result = 0;		
		
		int[] fwd = new int[n+1];
		int[] back = new int[n+1];
		
		for(int i=1;i<=n;++i){
			fwd[i]+=fwd[i-1];
			fwd[i]+=1;
			if(i>1){
				fwd[i]+=a;
			}
			if(photos.charAt(i-1)=='w'){
				fwd[i]+=b;
			}
		}
		
		for(int i=1;i<=n;++i){
			back[i]+=back[i-1];
			back[i]+=1;			
			back[i]+=a;			
			if(photos.charAt(n-i)=='w'){
				back[i]+=b;
			}
		}
		
		
		for(int i=1;i<=n;++i){
			int t1 = fwd[i];
			int t2 = (i-1)*a;
			if(t1<t){
				result = Math.max(result,i);
			}
			
			int leftTime = t - t1 - t2;
			if(leftTime<=0){
				continue;
			}
			int low = 0;
			int high = n;
			while(low<high){
				int mid = (low+high+1)/2;
				if(back[mid]<=leftTime){
					low = mid;
				}else{
					high = mid - 1;
				}
			}
			int curres = i + low;
			result = Math.max(result, Math.min(n,curres));
		}
		
		System.out.println(result);
	}		


	// -----------PrintWriter for faster output---------------------------------
	public static PrintWriter out = new PrintWriter(System.out);

	// -----------MyScanner class for faster input----------
	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

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

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

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}
	// --------------------------------------------------------

}
