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

public class Main {

	static class FastScanner {
		BufferedReader s;
		StringTokenizer st;

		public FastScanner(InputStream InputStream) {
			st = new StringTokenizer("");
			s = new BufferedReader(new InputStreamReader(InputStream));
		}

		public FastScanner(File f) throws FileNotFoundException {
			st = new StringTokenizer("");
			s = new BufferedReader(new FileReader(f));
		}

		public int nextInt() throws IOException {
			if (st.hasMoreTokens())
				return Integer.parseInt(st.nextToken());
			else {
				st = new StringTokenizer(s.readLine());
				return nextInt();
			}
		}

		public BigInteger big() throws IOException {
			if (st.hasMoreTokens())
				return new BigInteger(st.nextToken());
			else {
				st = new StringTokenizer(s.readLine());
				return big();
			}
		}

		public double nextDouble() throws IOException {
			if (st.hasMoreTokens())
				return Double.parseDouble(st.nextToken());
			else {
				st = new StringTokenizer(s.readLine());
				return nextDouble();
			}
		}

		public long nextLong() throws IOException {
			if (st.hasMoreTokens())
				return Long.parseLong(st.nextToken());
			else {
				st = new StringTokenizer(s.readLine());
				return nextLong();
			}
		}

		public String next() throws IOException {
			if (st.hasMoreTokens())
				return st.nextToken();
			else {
				st = new StringTokenizer(s.readLine());
				return next();
			}

		}

		public String nextLine() throws IOException {
			return s.readLine();
		}

		public void close() throws IOException {
			s.close();
		}

	}
	static int t, a, b, n;
	static long init;
	static long st[], bw[];
	public static void main(String[] args) throws java.lang.Exception {
		FastScanner in = new FastScanner(System.in);
		 n = in.nextInt();
		 a = in.nextInt();
		 b = in.nextInt();
		 t = in.nextInt();
		char arr[] = in.next().toCharArray();
		st = new long[n];
		bw = new long[n + 1];
		st[0] = 0l;
		bw[0] = st[0];
		init = (arr[0] == 'w' ? 1 + b: 1);
		for(int x = 1; x < n; x++) {
			st[x] = st[x - 1] + (arr[x] == 'w' ? a + b: a) + 1;
		}
		long data = 0l;
		for(int x = n - 1; x > 0; x--) {
			bw[x] = data + (arr[x] == 'w' ? a + b: a) + 1;
			data = bw[x];
		}
		int start = 0, end = n;
		int ans = 0;
		while(start <= end) {
			int mid = (end - start) / 2 + start;
			if(safe(mid)) {
				start = mid + 1;
				ans = mid;
			}
			else {
				end = mid - 1;
			}
		}
		System.out.println(ans);
	}
	private static boolean safe(int mid) {
		for(int x = 0; x < mid; x++) {
			long total = init;
			total += st[x];
			total += bw[n - mid + 1 + x];
			if(x != 0 && x != mid - 1) {
				int min = Math.min(x, mid - x - 1);
				total += a * (min);
			}
			if(total <= t)
				return true;
		}
		return false;
	}
}

