//package codeforeces345;
import java.io.*;
import java.util.*;

public class q4 {
	public static void main(String[] args) throws Exception
	{
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		int n=in.nextInt();
		int a=in.nextInt();
		int b=in.nextInt();
		long t=in.nextLong();
		String s=in.readString();
		long[] dp1=new long[n];
		for(int i=0;i<n;i++)
		{
			if(s.charAt(i)=='w')
			{
				dp1[i]=b+1;
			}
			else
			{
				dp1[i]=1;
			}
		}
		long[] cc1=new long[n];
		long[] cc2=new long[n];
		cc1[0]=dp1[0];
		cc2[n-1]=dp1[n-1];
		for(int i=1;i<n;i++)
		{
			cc1[i]=cc1[i-1]+dp1[i];
		}
		for(int i=n-2;i>=0;i--)
		{
			cc2[i]=cc2[i+1]+dp1[i];
		}
		long pp=0;
		for(int i=0;i<n;i++)
		{
			long ans=i*a+cc1[i];
			//long r=n-1;
			int  l=i+1;
			int  r=n-1;
			int aa=-1;
			
			while(l<=r)
			{
				int mid=(l+r)>>1;
				if(l==r || r==l+1)
				{
					if(cc2[l]+ans+Math.min(i, n-l)*a+(n-l)*a<=t)
					{
					aa=l;
					break;
					}
					if(cc2[r]+ans+Math.min(i, n-r)*a+(n-r)*a<=t)
					{
						aa=r;
						break;
					}
					break;
				}
				if(cc2[mid]+ans+Math.min(i,n-mid)*a+(n-mid)*a<=t)
				{
					aa=mid;
					r=mid-1;
				}
				else
				{
					l=mid+1;
				}
				
				
			}
			if(ans<=t)
			{
				pp=Math.max(pp, i+1);
				if(aa!=-1)
				{
					//System.out.println("aa is "+aa+" for "+i);
					pp=Math.max(pp, i+1+n-aa);
				}
			}
			
		}
		pw.println(pp);

		pw.close();
	}
	
	
	
	
	
	
	
	
	 static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[8192];
		private int curChar;
		private int snumChars;
		private SpaceCharFilter filter;

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

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

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			int res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}
		
		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			long res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}
		
		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}

