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

public class B {

	public void solve() {
		int n = in.nextInt();
		int a = in.nextInt();
		int b = in.nextInt();
		int T = in.nextInt();
		String s = in.nextToken();
		int firstTime = 1;
		if (s.charAt(0) == 'w') {
			firstTime += b;
		}
		if (firstTime > T) {
			out.println(0);
			return;
		}
		int all = firstTime;
		all += (n - 1) * (1 + a);
		for (int i = 1; i < n; i++) {
			if (s.charAt(i) == 'w') {
				all += b;
			}
		}
		if (all <= T) {
			out.println(n);
			return;
		}
		int left = 0;
		int curTime = firstTime;
		while (true) {
			int need = s.charAt(n - 1 - left) == 'w' ? b : 0;
			need += a + 1;
			if (curTime + need <= T) {
				left++;
				curTime += need;
			} else {
				break;
			}
		}
		int result = 1 + left;
		for (int right = 1; right < n; right++) {
			int need = s.charAt(right) == 'w' ? b : 0;
			need += a + 1;
			curTime += need;
			while (left != 0 && curTime + Math.min(left, right) * a > T) {
				int need2 = s.charAt(n - 1 - left + 1) == 'w' ? b : 0;
				need2 += a + 1;
				curTime -= need2;
				left--;
			}
			if (curTime + Math.min(left, right) * a > T) {
				break;
			}
			result = Math.max(result, 1 + left + right);
		}
		out.println(result);
	}

	public void run() {
		in = new FastScanner();
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	FastScanner in;
	PrintWriter out;

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String fileName) {
			try {
				br = new BufferedReader(new FileReader(fileName));
			} catch (FileNotFoundException e) {
			}
		}

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

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

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

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

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

	public static void main(String[] args) {
		new B().run();
	}
}