import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;

public class P650B
{
	public static void main(String[] args)
	{
		FastScanner in = new FastScanner(System.in);
		int n = in.nextInt();
		long a = in.nextInt();
		long b = in.nextInt();
		long t = in.nextInt();
		char[] arr = in.nextLine().toCharArray();
		long[] right = new long[n];
		right[0] = (arr[0] == 'w' ? b : 0) + 1;
		for (int i = 1; i < n; i++)
			right[i] = right[i - 1] + (arr[i] == 'w' ? b : 0) + 1;
		long[] left = new long[n + 1];
		for (int i = n - 1; i > 0; i--)
			left[i] = left[i + 1] + (arr[i] == 'w' ? b : 0) + 1;
		left[0] = Integer.MAX_VALUE;
		//System.out.println(Arrays.toString(right));
		//System.out.println(Arrays.toString(left));
		long c = -a;
		int r = -1;
		while (++r < n && c + right[r] + a <= t)
			c += a;
		if (r == 0) {
			System.out.println(0);
			return;
		}
		int max = r;
		//System.out.println("max = " + max);
		long rA = (r - 1) * a;
		long lA = 0;
		int l = n;
		while (--r >= 0) {
			// go left
			while (true) {
				l--;
				lA += a;
				
				if (right[r] + left[l] + lA + rA + Math.min(lA, rA) <= t)
					continue;
				//System.out.println("r == " + r + " l == " + l);
				//System.out.println("rA = " + rA + " lA = " + lA);
				//System.out.println(r + n - l);
				max = Math.max(max, r + n - l);
				l++;
				lA -= a;
				break;
			}
			rA -= a;
		}
		System.out.println(Math.min(max, n));
	}
	
	/**
	 * Source: Matt Fontaine
	 */
	public static class FastScanner
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public FastScanner(InputStream stream)
		{
			this.stream = stream;
		}

		int read()
		{
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				} catch (IOException e)
				{
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		boolean isSpaceChar(int c)
		{
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		boolean isEndline(int c)
		{
			return c == '\n' || c == '\r' || c == -1;
		}

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

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

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

		public String next()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine()
		{
			int c = read();
			while (isEndline(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			} while (!isEndline(c));
			return res.toString();
		}
	}
}