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

public class ImagePreview {
    public static void main(String[] args) {
        FasterScanner sc = new FasterScanner();
        
        int N = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int T = sc.nextInt();
        
        char[] S = sc.nextLine().toCharArray();
        
        int rem = T;
        int R = -1;
        for (int i = 0; i < N; i++) {
        	int req = getCost(i, S, A, B);
        	if (req > rem) {
        		break;
        	}
        	R = i;
        	rem -= req;
        }
        
        if (R < 0) {
        	System.out.println(0);
        	return;
        } else if (R == N - 1) {
        	System.out.println(N);
        	return;
        }
        
        int best = R + 1;
        rem -=  R * A;
        for (int i = N - 1; i > 0; i--) {
        	int reqL = getCost(i, S, A, B);
        	while (rem < reqL && R > 0) {
        		int reqR = getCost(R, S, A, B);
        		rem += reqR;
        		R--;
        	}
        	if (rem < reqL) {
        		break;
        	}
        	rem -= reqL;
        	best = Math.max(best, N - i + R + 1);
        }
        System.out.println(best);
    }
    
    public static int getCost(int i, char[] S, int A, int B) {
    	int req = 1;
    	if (i > 0) {
    		req += A;
    	}
    	if (S[i] == 'w') {
    		req += B;
    	}
    	return req;
    }

	public static class FasterScanner {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

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

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

		public String nextString() {
			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 long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}

		public int[] nextIntArray(int n, int offset) {
			int[] arr = new int[n + offset];
			for (int i = 0; i < n; i++) {
				arr[i + offset] = nextInt();
			}
			return arr;
		}

		public long[] nextLongArray(int n) {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}
			return arr;
		}

		public long[] nextLongArray(int n, int offset) {
			long[] arr = new long[n + offset];
			for (int i = 0; i < n; i++) {
				arr[i + offset] = nextLong();
			}
			return arr;
		}

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

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