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

public class Kruskal {
	private static InputStream stream;
	private static byte[] buf = new byte[1024];
	private static int curChar;
	private static int numChars;
	private static SpaceCharFilter filter;
	private static PrintWriter pw;

	public static void main(String args[]) throws Exception {
		InputReader(System.in);
		pw = new PrintWriter(System.out);
		//ans();
		soln();
		pw.close();
	}
	

	// To Get Input
	// Some Buffer Methods
 
	public static void InputReader(InputStream stream1) {
		stream = stream1;
	}
 
	private static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
 
	private static boolean isEndOfLine(int c) {
		return c == '\n' || c == '\r' || c == -1;
	}
 
	private static 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++];
	}
 
	private static 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;
	}
 
	private static 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;
	}
 
	private static String nextToken() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}
 
	private static 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();
	}
 
	private static int[] nextIntArray(int n) {
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nextInt();
		}
		return arr;
	}
 
	private static int[][] next2dArray(int n, int m) {
		int[][] arr = new int[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				arr[i][j] = nextInt();
			}
		}
		return arr;
	}
	private static char[][] nextCharArray(int n,int m){
		char [][]c=new char[n][m];
		for(int i=0;i<n;i++){
			String s=nextLine();
			for(int j=0;j<s.length();j++){
				c[i][j]=s.charAt(j);
			}
		}
		return c;
	}
 
	private static long[] nextLongArray(int n) {
		long[] arr = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nextLong();
		}
		return arr;
	}
 
	private static void pArray(int[] arr) {
		for (int i = 0; i < arr.length; i++) {
			pw.print(arr[i] + " ");
		}
		pw.println();
		return;
	}
 
	private static void pArray(long[] arr) {
		for (int i = 0; i < arr.length; i++) {
			pw.print(arr[i] + " ");
		}
		pw.println();
		return;
	}
 
	private static void pArray(boolean[] arr) {
		for (int i = 0; i < arr.length; i++) {
			pw.print(arr[i] + " ");
		}
		pw.println();
		return;
	}
 
	private static boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}
 
	private interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
	
	private static void soln(){


		int n=nextInt();
		long swipe=nextLong();
		long orient=nextLong();
		int time=nextInt();
		
		String s=nextLine();
		
		long right[]=new long[n+1];
		for(int i=0;i<s.length();i++){
			if(s.charAt(i)=='w')
				right[i+1]+=orient;
			right[i+1]++;
			if(i>0) right[i+1]+=swipe;
			right[i+1]+=right[i];
		}
		
		long left[]=new long[n+1];
				for(int i=s.length()-1;i>=0;i--){
					if(s.charAt(i)=='w')
						left[s.length()-i]+=orient;
					left[s.length()-i]++;
					left[s.length()-i]+=swipe;
					left[s.length()-i]+=left[s.length()-i-1];
				}
			
				int an=0;
				for(int i=1;i<=n;i++){
					if(right[i]<=time){
						long time_left=time-(right[i]+((i-1)*swipe));
						int no_seen=i;
						int l=1,r=n-i;
						while(l<r){
							int mid=(l+r)/2;
							if(left[mid]<=time_left){
								l=mid+1;
								no_seen=i+mid;
							}else{
								r=mid;
							}
						}
					
					an=Math.max(an, no_seen);
					
					}else{
						break;
					}
				//	System.out.println(i);
					}
				//System.out.println(an);
				for(int i=1;i<=n;i++){
					if(left[i]<=time){
						long time_left=time-(left[i]+i*swipe);
						int l=1,r=n-i+1;
						int no_seen=-1;
						while(l<r){
							int mid=(l+r)/2;
							if(right[mid]<=time_left){
								l=mid+1;
								no_seen=i+mid;
							}else{
								r=mid;
							}
						}
						an=Math.max(an, no_seen);
					}else{
						break;
					}
				}
				pw.println(an);
				
}
}
class Dsu{
	private int rank[], parent[] ,n;
	
	Dsu(int size){
		this.n=size+1;
		rank=new int[n];
		parent=new int[n];
	makeSet();
	}
	
	void makeSet(){
		for(int i=0;i<n;i++){
			parent[i]=i;
		}
	}
	
	int find(int x){
		if(parent[x]!=x){
			
			parent[x]=find(parent[x]);
		}
		return parent[x];
	}	
	
	void union(int x,int y){
		int xRoot=find(x);
		int yRoot=find(y);
		
		if(xRoot==yRoot)
			return;
		if(rank[xRoot]<rank[yRoot]){
		parent[xRoot]=yRoot;	
		}else if(rank[yRoot]<rank[xRoot]){
			parent[yRoot]=xRoot;
		}else{
			parent[yRoot]=xRoot;
			rank[xRoot]++;
		}
		
	}
 
}
class Pair implements Comparable<Pair>{

	int u,v,w;
	 Pair(int from,int to,int dist) {
		 u=from;
		 v=to;
		 w=dist;
		// TODO Auto-generated constructor stub
	
	}
	@Override
	public int compareTo(Pair arg0) {
		// TODO Auto-generated method stub
		return w-arg0.w;
	}
	
}
class Graph{
	private int V;
	private boolean Visited[];
	private LinkedList<Node> adj[];
	Graph(int V){
		this.V=V++;
		Visited=new boolean[V];
		adj=new LinkedList[V];
		for(int i=0;i<V;i++){
			adj[i]=new LinkedList<Node>();
		}
	}
	void addEdge(int u,int v,int w){
		adj[u].add(new Node(v,w));
	}
	
	
}

class Node{
	int v,w;
	Node(int to,int dist){
		v=to;
		w=dist;
	}
	public int getV() {
		return v;
	}
	public int getW() {
		return w;
	}
	
}
