import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;


public class Main_Round345Div2_D {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Printer pr = new Printer(System.out);

		int n = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();
		int t = sc.nextInt();
		char[] wh = sc.next().toCharArray();

		List<Long> fw = new ArrayList<Long>();
		for (int i = 0; i < n; i++) {
			long tmp = 0;
			if (i > 0) {
				tmp += a + fw.get(i - 1);
			}
			if (wh[i] == 'w') {
				tmp += b;
			}
			tmp += 1;
			fw.add(tmp);
		}

		List<Long> bw = new ArrayList<Long>();
		for (int i = 0; i < n; i++) {
			long tmp = 0;
			if (i > 0) {
				tmp += a + bw.get(i - 1);
			}
			if (wh[n - 1 - i] == 'w') {
				tmp += b;
			}
			tmp += 1;
			bw.add(tmp);
		}

		int max = 0;
		for (int i = 0; i < fw.size(); i++) {
			long time = t - fw.get(i);
			if (time < 0) {
				break;
			}
			int num = i + 1;
			time -= (i + 1) * a;
			num += upper_bound(bw, 0, bw.size(), time);
			max = Math.max(max, num);
//			System.out.printf("%d %d\n", i, max);
		}

		for (int i = 0; i < n; i++) {
			bw.set(i, bw.get(i) + fw.get(0) + a);
		}
		for (int i = 1; i < n; i++) {
			fw.set(i, fw.get(i) - fw.get(0));
		}
		bw.add(0, fw.remove(0));
		for (int i = 0; i < bw.size(); i++) {
			long time = t - bw.get(i);
			if (time < 0) {
				break;
			}
			int num = i + 1;
			time -= (i + 1) * a;
			num += upper_bound(fw, 0, fw.size(), time);
			max = Math.max(max, num);
//			System.out.printf("%d %d\n", i, max);
		}

		pr.println(Math.min(n, max));

		pr.close();
		sc.close();
	}

	private static int upper_bound(List<Long> data, int l, int r, long value) {
		while (r > l) {
			int mid = (r + l) / 2;
			if (data.get(mid) > value) {
				r = mid;
			} else {
				l = mid + 1;
			}
		}

		return r;
	}

	@SuppressWarnings("unused")
	private static class Scanner {
		BufferedReader br;
		Iterator<String> it;

		Scanner (InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
		}

		String next() throws RuntimeException  {
			try {
				if (it == null || !it.hasNext()) {
					it = Arrays.asList(br.readLine().split(" ")).iterator();
				}
				return it.next();
			} catch (IOException e) {
				throw new IllegalStateException();
			}
		}

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

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

		float nextFloat() throws RuntimeException {
			return Float.parseFloat(next());
		}

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

		void close() {
			try {
				br.close();
			} catch (IOException e) {
//				throw new IllegalStateException();
			}
		}
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
