import java.util.*;
import java.lang.*;
import java.util.Random;
import java.util.Scanner;
public class saitama{
    static int y =0 , x=0 ; 
 	int i =0   ;
 	boolean left = false ;
 	boolean right = false ;
	 static int sectime=0;
	 static int steps[]=new int [100000];
	 static int dp[]=new int [100000];
	 static int[] arr = new int [100000];
	static int[] j = new int [100000];
	static boolean[] mmm = new boolean[100000] ;
    public static void main (String args[]){
        int n , a , b , t ;
        char[] foo ;
        String zew;
        int max = 0;
    	Scanner input = new Scanner(System.in);
    	n=input.nextInt();
    	a=input.nextInt();
    	b=input.nextInt();
    	t=input.nextInt();
    	
    	zew=input.next();
    	foo=zew.toCharArray();
    	Arrays.fill(dp,0);
    	Arrays.fill(mmm, 0, 1000, true);
    	Arrays.fill(arr, 0);
    	Arrays.fill(j, 0);
    	Arrays.fill(steps, 0);
    	max= recursion(y,0,a,b,t,foo);
    	System.out.println(max);
    }
    public static  int recursion(int y ,int i , int a , int b , int t , char[] foo )
    {
    	steps[x]=i;
    	if(arr[y] >= t+a )
    	{
    		return j[y] ;
    	}
    	if (foo[i]=='w' && i<foo.length && mmm[i] && i>=0 )
    	{
    		if(i==0)
    		{
    			steps[x]=i;
    			x++;
    			mmm[i]=false;
    			sectime = b + a + 1 ;
        		arr[y+1]=arr[y]+ sectime;
        		if(arr[y+1]<=t+a)
    		    {
    		    	
			        j[y+1]=j[y]+1;
    		    }
        		if(i+1<foo.length)
        		{
        			dp[i]= Math.max(recursion(y+1,foo.length-1, a, b, t, foo),recursion(y+1,i+1,a,b,t,foo));
        		    return dp[i] ;
        		}
        		else
        			return j[y];
    		}
    		else if (i==foo.length-1 )
    		{
    				steps[x]=i;
        			x++;
    				mmm[i]=false;
    			    sectime = b + a + 1 ;
        		    
        		    arr[y+1]=arr[y]+sectime;
        		    if(arr[y+1]<=t+a)
        		    {
    			        j[y+1]=j[y]+1;
        		    }
        		    if(i-1>=0)
        		    {
        		    	dp[i]= Math.max(recursion(y+1,0, a, b, t, foo),recursion(y+1,i-1,a,b,t,foo));
        	         	return dp[i] ;
        		    }
        		    else
        		    	return j[y];
    		}
    		else
    		{
    			if(i-1 >=0 && i+1<foo.length)
    			{
    				steps[x]=i;
        			x++;
    				mmm[i]=false;
    			    sectime = b + a + 1 ;
        	     	arr[y+1]=arr[y] + sectime;
        	     	if(arr[y+1]<=t+a)
        		    {
    			        j[y+1]=j[y]+1;
        		    }
        	     	if(i+1<foo.length && i-1>=0)
        	     	{
        	     		dp[i]= Math.max(recursion(y+1,i+1, a, b, t, foo),recursion(y+1,i-1,a,b,t,foo));
        	     	    return dp[i] ;
        	     	}
        	     	else
        	     		return j[y];
    			}
    			else
    				return j[y] ;
    		}
    		
    	}
    	else if (foo[i]=='h' && i<foo.length && mmm[i] && i>=0)
    	{
    		if(i==0)
    		{
    			steps[x]=i;
    			x++;
    			mmm[i]=false;
    			sectime =  a + 1 ;
        		
        		arr[y+1]=arr[y]+ sectime;
        		if(arr[y+1]<=t+a)
    		    {
			        j[y+1]=j[y]+1;
    		    }
        		if(i+1<foo.length)
        		{
        			dp[i]= Math.max(recursion(y+1,foo.length-1, a, b, t, foo),recursion(y+1,i+1,a,b,t,foo));
        		    return dp[i] ;
        		}
        		else
        			return j[y];
    		}
    		else if (i==foo.length-1 )
    		{
    			steps[x]=i;
    			x++;
    			mmm[i]=false;
    			sectime =  a + 1 ;
        		
        		arr[y+1]=arr[y]+sectime;
        		if(arr[y+1]<=t+a)
    		    {
			        j[y+1]=j[y]+1;
    		    }
        		if(i-1>=0)
        		{
        			dp[i]= Math.max(recursion(y+1,0, a, b, t, foo),recursion(y+1,i-1,a,b,t,foo));
        		    return dp[i] ;
        		}
        		else
        			return j[y];
    		}
    		else if (i+1<foo.length && i-1>=0)
    		{
    			steps[x]=i;
    			x++;
    			mmm[i]=false;
    			sectime =  a + 1 ;
        		
        		arr[y+1]=arr[y]+sectime;
        		if(arr[y+1]<=t+a)
    		    {
			        j[y+1]=j[y]+1;
    		    }
        		if(i-1>=0)
        		{
        			dp[i]= Math.max(recursion(y+1 , i+1 , a, b, t, foo),recursion(y+1,i-1,a,b,t,foo));
                    return dp[i];
        		}
        		else
        			return j[y];
    		}
    		else
    			return j[y];
    		
    	}
    	int v=0;
    	for(int p = 0 ; p< foo.length ; p++)
    	{
    		if (mmm[p])
    		{
    			v=1;
    		}
    	}
    	if (v==0)
    	{
    		return j[y];
    	}
        else if (mmm[i]==false && steps[x]>steps[x-1]) 
    	{
    			if(steps[x]==foo.length-1 && steps[x-1]==0)
    			{
    				x++;
    				dp[i]= recursion(y,i-1,a,b,t,foo);
                    return dp[i];
    			}
    			else if(i+1<foo.length)
    			{
    				    x++;
    					dp[i]= recursion(y,i+1,a,b,t,foo);
                        return dp[i];   
    			}
    			else if ( i == foo.length-1 && steps[x-1]!=0 )
    			{
    				x++;
    				dp[i]= recursion(y,0,a,b,t,foo);
                    return dp[i]; 
    			}
    			else
    				return j[y] ;
    		}
    		else if (mmm[i]==false && steps[x]<steps[x-1] )
    		{
    			if(steps[x-1]==foo.length-1 && steps[x]==0 && i+1<foo.length)
    			{
    				x++;
    				dp[i]= recursion(y,i+1,a,b,t,foo);
                    return dp[i];
    			}
    			else if (i-1>=0)
    			{
    				x++;
    				dp[i]= recursion(y,i-1,a,b,t,foo);
                    return dp[i];
    			}
    			else if ( i == 0 && steps[x-1]!=foo.length-1 )
    			{
    				x++;
    				dp[i]= recursion(y,foo.length-1,a,b,t,foo);
    				return dp[i];
    			}
    			else 
    				return j[y] ;
    		}
    		else 
    			return j[y] ;
    }
		}


