import java.io.*;
import java.util.*;
import java.awt.Point;

public class Div2_345_D {
	public static void main(String[] args) throws IOException {
		BufferedInputStream bis = new BufferedInputStream(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(bis));
		PrintWriter out = new PrintWriter(System.out);
		String line;
		StringTokenizer st;
		while ((line = br.readLine()) != null && !line.equals("")) {
			st = new StringTokenizer(line);
			int n = Integer.parseInt(st.nextToken());
			int swap = Integer.parseInt(st.nextToken());
			int flip = Integer.parseInt(st.nextToken());
			int T = Integer.parseInt(st.nextToken());
			String status = br.readLine().trim();
			long [][] dp = new long[2][n];
			dp[0][0] = dp[1][0] = (status.charAt(0)=='w'?flip:0);
			for(int j = 1;j < n;j++) {
				dp[0][j] = dp[0][j-1]+swap+(status.charAt(j)=='w'?flip:0);
			}
			for(int j = n-1;j > 0;j--) {
				dp[1][j] = dp[1][(j+1)%n]+swap+(status.charAt(j)=='w'?flip:0);
			}
			int res = 0;
			for(int i = 0;i < n;i++) {
				if(dp[0][i]+(i+1) <= T) {
					int start = i+1, end = n-1, mid = (start+end)/2, rem = (int)Math.max(T-dp[0][i]-i-1-i*1l*swap, 0);
					while(start < end) {
						mid = (start+end)/2;
						if(dp[1][mid]+n-mid <= rem) {
							end = mid;
						} else
							start = mid+1;
					}
					res = Math.max(res, i+1);
					if(start < n && dp[1][start]+n-start <= rem)
						res = Math.max(res, i+1+n-start);
				}
				if(dp[1][i]+(n-i+1) <= T && i != 0) {
					int start = 1, end = i-1, mid, rem = (int)Math.max(T-dp[1][i]-(n-i+1)-(n-i)*1l*swap, 0);
					while(start < end) {
						mid = (start+end+1)/2;
						if(dp[0][mid]+mid <= rem) {
							start = mid;
						} else {
							end = mid-1;
						}
					}
					res = Math.max(res, n+1-i);
					if(end == start && dp[0][start]+start <= rem)
						res = Math.max(res, n+1-i+start);
				}
			}
			out.println(res);
		}
		out.close();
	}
}