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

public class Main {
	static boolean readFile = false;

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Task solver = new Task();
		solver.solve(in, out);
		out.close();
	}
}

class Task {

	public void solve(InputReader in, PrintWriter out) throws IOException {
		int n = in.nextInt();
		int a = in.nextInt();
		int b = in.nextInt();
		int t = in.nextInt();

		char[] s = in.next().toCharArray();
		if (s[0] == 'w') {
			if (b + 1 > t) {
				System.out.println(0);
				return;
			}
			t -= b + 1;
		} else {
			t--;
		}
		int f = 0;
		long[] boo = new long[n + 1];
		Arrays.fill(boo, Integer.MAX_VALUE);
		boo[0] = 0;
		for (int i = 0; i < n - 1; ++i) {
			char c = s[n - i - 1];
			if (c == 'w') {
				f += b;
			}
			f += a + 1;
			boo[i + 1] = f;

		}
		f = 0;
		long[] foo = new long[n];
		Arrays.fill(foo, Integer.MAX_VALUE);
		foo[0] = 0;
		for (int i = 1; i < n; ++i) {
			char c = s[i];
			if (c == 'w') {
				f += b;
			}
			f += a + 1;
			foo[i] = f;

		}
		long max = 0;
		for (int i = n - 1; i >= 0; --i) {
			if (boo[i] > t) {
				continue;
			}
			int index = lowerBound(foo, t - boo[i], i, a);
			max = Math.max(max, i + index);
		}
		System.out.println(Math.min(n, max + 1));
	}

	public static int lowerBound(long[] arr, long value, long index, long a) {
		int right = arr.length - 1;
		int left = 0;

		while (right != left) {
			int mid = (right + left + 1) >> 1;
			if (arr[mid] + Math.min(mid, index) * a <= value) {
				left = mid;
			} else {
				right = mid - 1;
			}
		}

		if (arr[left] + Math.min(left, index) * a <= value) {
			return left;
		}
		return left - 1;
	}
}

class Sort implements Comparable<Sort> {
	public int r;
	public int t;
	public int index;

	@Override
	public int compareTo(Sort a) {
		if (this.r - a.r != 0) {
			return a.r - this.r;
		}
		return a.index - this.index;

	}
}

class InputReader {
	StringTokenizer tokenizer;
	BufferedReader reader;
	String token;

	public InputReader(InputStream stream) {
		tokenizer = null;
		reader = new BufferedReader(new InputStreamReader(stream));
	}

	public InputReader(FileInputStream stream) {
		tokenizer = null;
		reader = new BufferedReader(new InputStreamReader(stream));
	}

	public String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return tokenizer.nextToken();
	}

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

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