// practice with rainboy
import java.io.*;
import java.util.*;

public class CF650B extends PrintWriter {
	CF650B() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF650B o = new CF650B(); o.main(); o.flush();
	}

	int solve(byte[] cc, int n, int a, int b, int t) {
		int[] pp = new int[n];
		pp[0] = 1 + (cc[0] == 'w' ? b : 0);
		for (int i = 1; i < n; i++)
			pp[i] = pp[i - 1] + 1 + (cc[i] == 'w' ? b : 0) + a;
		int[] qq = new int[n + 1];
		qq[n] = 0;
		for (int i = n - 1; i >= 0; i--)
			qq[i] = qq[i + 1] + 1 + (cc[i] == 'w' ? b : 0) + a;
		int i = n - 1;
		while (i >= 0 && pp[i] > t)
			i--;
		int ans = i + 1;
		for (int j = n; i >= 0; i--) {
			while (j > i && pp[i] + qq[j] + i * a <= t)
				j--;
			ans = Math.max(ans, i + 1 + n - 1 - j);
		}
		return ans;
	}
	void main() {
		int n = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();
		int t = sc.nextInt();
		byte[] cc = sc.next().getBytes();
		int ans1 = solve(cc, n, a, b, t);
		for (int i = 1, j = n - 1; i < j; i++, j--) {
			byte tmp = cc[i]; cc[i] = cc[j]; cc[j] = tmp;
		}
		int ans2 = solve(cc, n, a, b, t);
		println(Math.max(ans1, ans2));
	}
}
