
import java.util.*;

public class Image {
	
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int a = input.nextInt();
		int b = input.nextInt();
		int t = input.nextInt();
		input.nextLine();
		char[] orientations = input.nextLine().trim().toCharArray();
		int[] costs = new int[orientations.length];
		for (int i = 0; i < costs.length; ++i) {
			costs[i] = 1;
			if (orientations[i] == 'w') costs[i] += b;
		}
		input.close();
		
		int[] ps = new int[costs.length];
		int[] ss = new int[costs.length];
		ps[0] = costs[0];
		ss[0] = costs[costs.length - 1];
		for (int i = 1; i < costs.length; ++i) {
			ps[i] = costs[i] + ps[i - 1];
			ss[i] = costs[costs.length - i - 1] + ss[i - 1];
		}
		
		
		int low = 0;
		int high = orientations.length;
		while (high - low > 4) {
			int mid = (low + high) / 2;
			if (canWatch(mid, n, ps, ss, t, a)) low = mid;
			else high = mid;
		}
		
		for (int i = high; i >= low; --i) {
			if (canWatch(i, n, ps, ss, t, a)) {
				System.out.println(i);
				return;
			}
		}
	}
	
	private static boolean canWatch(int k, int n, int[] ps, int[] ss, long t, int a) {
		if (k == 0) return true;
		if (k >= n) return ps[ps.length - 1] + (ps.length - 1) * a <= t;
		for (int i = 0; i <= k; ++i) {
			long lefts = i > 0 ? ss[i - 1] : 0;
			long rights = i < k ? ps[k - i - 1] : 0;
			long cost = lefts + rights + a * (k - 1) + Math.max(0, Math.min(i - 1, k - i - 1)) * a; 
			if (cost <= t) return true;
		}
		return false;
	}

}
