/*
     * Code Author: Akshay Miterani
     * DA-IICT
     */
    import java.io.*;
import java.util.*;
    
     
    public class Contest02 {
     
    	static double eps=(double)1e-6;
    	static long mod=(int)1e9+7;
    	static boolean f=true;
    	public static void main(String args[]){
    		InputReader in = new InputReader(System.in);
    		OutputStream outputStream = System.out;
    		PrintWriter out = new PrintWriter(System.out);
    		//----------My Code Starts Here----------
    		int n=in.nextInt();
    		int a=in.nextInt();
    		int b=in.nextInt();
    		int t=in.nextInt();
    		String s=in.nextLine();
    		char tmp[]=new char[s.length()];
    		for(int i=s.length()-1;i>=0;i--){
    			tmp[s.length()-1-i]=s.charAt(i);
    		}
    		String sr=new String(tmp);
    		//System.out.println(sr+s);
    		String o=sr+s;
    		long pre[]=new long[o.length()+1];
    		for(int i=s.length();i<2*s.length();i++){
    			if(i!=s.length())
    				pre[i]+=pre[i-1]+a;
    			pre[i]+=1;
    			if(o.charAt(i)=='w'){
    				pre[i]+=b;
    			}
    		}
    		for(int i=s.length()-1;i>=0;i--){
    			if(i!=s.length()-1)
    				pre[i]+=pre[i+1]+a;
    			pre[i]+=1;
    			if(o.charAt(i)=='w'){
    				pre[i]+=b;
    			}
    		}
    		ArrayList<Long> upper=new ArrayList<Long>();
    		ArrayList<Long> lower=new ArrayList<Long>();
    		for(int i=s.length();i<2*s.length();i++){
    			upper.add(pre[i]);
    		}
    		for(int i=s.length()-1;i>=0;i--){
    			lower.add(pre[i]);
    		}
    		/*
    		for(int i=0;i<o.length();i++){
    			System.out.println(i+" "+pre[i]);
    		}
    		*/
    		/*
    		for(int x:lower){
    			System.out.println(x);
    		}
    		*/
    		long ans=0;
    		for(int i=0;i<s.length();i++){
    			int ind=s.length()-1-i;
    			long val=lower.get(ind);
    			if(val<=t)
    				ans=Math.max(ans, ind+1);
    			else
    				continue;
    			if(t-a*ind-val+pre[s.length()]<0)
    				continue;
    			int pos=Collections.binarySearch(upper, t-a*ind-val+pre[s.length()]);
    			if(pos>=0){
    				
    			}
    			else{
    				pos=-pos;
    				pos-=2;
    			}
    			//System.out.println(ind+" "+pos+" "+(val)+" "+(t-a*ind-val+pre[s.length()]));
    			ans=Math.max(ans, ind+1+pos);
    		}
    		for(int i=0;i<s.length();i++){
    			int ind=i;
    			long val=upper.get(ind);
    			if(val<=t)
    				ans=Math.max(ans, ind+1);
    			else
    				continue;
    			if(t-a*ind-val+pre[s.length()]<0)
    				continue;
    			int pos=Collections.binarySearch(lower, t-a*ind-val+pre[s.length()]);
    			//System.out.println(pos);
    			if(pos>=0){
    				
    			}
    			else{
    				pos=-pos;
    				pos-=2;
    			}
    			//System.out.println(ind+" "+pos+" "+(val)+" "+(t-a*ind-val+pre[s.length()]));
    			ans=Math.max(ans, ind+1+pos);
    		}
    		System.out.println(Math.min(ans, n));
    		out.close();
    		//---------------The End------------------
    	}
    	
    	static class Pair implements Comparable<Pair>{
    		int x;
    		int y;
    		int p,t;
    		Pair(int xx,int yy){
    			x=xx;
    			y=yy;
    		}
    		@Override
    		public int compareTo(Pair o) {
    			if(f)
					return Long.compare((this.p),(o.p));
				else
					return Long.compare((this.t),(o.t));
    		}
    	}
    	
    	static class InputReader {
    	    public BufferedReader reader;
    	    public StringTokenizer tokenizer;
     
    	    public InputReader(InputStream inputstream) {
    	      reader = new BufferedReader(new InputStreamReader(inputstream));
    	      tokenizer = null;
    	    }
    	    
    	    public String nextLine(){
    	    	String fullLine=null;
    	    	while (tokenizer == null || !tokenizer.hasMoreTokens()) {
    	            try {
    	              fullLine=reader.readLine();
    	            } catch (IOException e) {
    	              throw new RuntimeException(e);
    	            }
    	            return fullLine;
    	          }
    	          return fullLine;
    	    }
    		public String next() {
    	      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
    	        try {
    	          tokenizer = new StringTokenizer(reader.readLine());
    	        } catch (IOException e) {
    	          throw new RuntimeException(e);
    	        }
    	      }
    	      return tokenizer.nextToken();
    	    }
    		public long nextLong() {
    		      return Long.parseLong(next());
    		    }
    	    public int nextInt() {
    	      return Integer.parseInt(next());
    	    }
    	  }
    } 