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

public class main {
	private static PrintWriter out;
	private static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		public FastScanner() throws FileNotFoundException {
			br = new BufferedReader(new InputStreamReader(System.in));//new FileReader(new File("input.txt"))
		}
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
	
    static int n, swipeT, rotT, timeL, max = 0;
    static String input;
    
	
	public static void main(String[] args) throws Exception {
		FastScanner sc = new FastScanner();
		out = new PrintWriter(new BufferedOutputStream(System.out));
		
		//int k = sc.nextInt();
		//for(int m = 0; m < k; m ++)
		//{
		
		n = sc.nextInt(); swipeT = sc.nextInt(); rotT = sc.nextInt(); timeL = sc.nextInt();
        char [] input = sc.nextLine().toCharArray();
        /*
		RRRRRR, all right
		RRRLLLL, right some, left some
		LLLRRR, left some, right some
		LLLLLLL, all left
         */

        //int [][] timeRight = new int [n-1][3];
        int [] watchRight = new int [n];
        int [] watchLeft = new int [n];
        int [] timeRight = new int [n];
        int [] timeLeft = new int [n];
        int [] indexLeft = new int [n];
        int [] indexRight = new int [n];
        int penaltyR = 0, watchR = 0;
        int penaltyL = 0, watchL = 0;
        int initialWatch = 0, initialPenalty = 0;
        
        Set<Integer> turningPoint = new HashSet<Integer>();
        
        for(int i = 0; i < n; i ++)
        {
        	
        	if(i!=0)
        	{
        		penaltyR+= swipeT;
        		penaltyL+= swipeT;
        	}
        	
        	penaltyL++;
        	penaltyR++;
        	
        	
        	if(input[i]=='w')
        	{
        		penaltyR += rotT;
        		turningPoint.add(i);
        	}
        	
        	if(i==0 && input[i] == 'w')
        	{
        		penaltyL += rotT;
        		//System.out.println("Idx : " + 0);
        	}
        	else if(i!=0 && input[(n-i)]=='w')
        	{
        		//System.out.println("Idx : " + (n-i));
        		penaltyL += rotT;
        	}

        	if(penaltyR <= timeL)
        	{
        		watchR ++;
        	}
        	
        	if(penaltyL <= timeL)
        	{
        		watchL ++;
        	}
        	
        	if(i != 0)
        	{
            	timeLeft[i] = penaltyL-initialPenalty;
            	timeRight[i] = penaltyR-initialPenalty;

            	watchLeft[i] = i;
            	watchRight[i] = i;
            	
            	indexLeft[i] = n-i;
            	indexRight[i] = i;
        	}
        	else
        	{
        		initialPenalty = penaltyR;
        		initialWatch = watchR;
        	}
        	
        }
        
        max = Math.max(watchR, watchL);
	    timeLeft[0] = 0;
	    watchLeft[0] = 0;
	    //System.out.println("Initial penalty : " + initialPenalty + " Initial watch : " + initialWatch);
        /*
	    for(int i = 0; i < n; i ++)
	    {
	    	System.out.println("Val : " + timeRight[i]);
	    }*/
        
	    for(Integer i : turningPoint)
	    {
	    	//RL
	    	int rightPtr = i - 1;
	    	if(rightPtr >= 0)
	    	{
		    	int pointRemain = timeL - (timeRight[rightPtr] + initialPenalty + (rightPtr*swipeT));// - (rightPtr*swipeT);
		    	int watch = watchRight[rightPtr] + initialWatch;
		    	//System.out.println(pointRemain + " " + watch);
		    	if(pointRemain > 0)
		    	{
		    		int leftPtr = Arrays.binarySearch(timeLeft, pointRemain);
		    		if(leftPtr<0)
		    		{
		    			leftPtr = ((-leftPtr)-2);
		    		}
		    		if(rightPtr >= n-leftPtr)
		    		{
		    			//System.out.println(rightPtr + " " + (n-leftPtr));
		    			leftPtr = n - (rightPtr + 1);
		    			//System.out.println(rightPtr + " " + (n-leftPtr) + " " + (leftPtr));
		    		}
	    			if((pointRemain - timeLeft[leftPtr]) >= 0)
	    			{
	    				max = Math.max(max, (watch+leftPtr));
	    				//System.out.println((watch+leftPtr));
	    			}
		    	}
	    	}
	    	//////LR
	    	int leftPtr = i+1;
	    	if(leftPtr < n)
	    	{
		    	int pointRemain = timeL - (timeLeft[n-leftPtr] + initialPenalty + ((n-leftPtr)*swipeT));
		    	int watch = watchLeft[n-leftPtr] + initialWatch;
	    		//System.out.println(watch + " " + pointRemain);
		    	
		    	if(pointRemain > 0)
		    	{
		    		int rightPointer = Arrays.binarySearch(timeRight, pointRemain);
		    		if(rightPointer<0)
		    		{
		    			rightPointer = ((-rightPointer)-2);
		    		}
		    		if(rightPointer >= leftPtr)
		    		{
		    			rightPointer = (leftPtr - 1);
		    		}
		    		if((pointRemain - timeRight[rightPointer]) >= 0)
	    			{
	    				max = Math.max(max, (watch+rightPointer));
	    				//System.out.println((watch+rightPointer));
	    			}
		    		//System.out.println(leftPtr + " " + rightPointer);
		    		/*
		    		if(rightPtr >= n-leftPtr)
		    		{
		    			//System.out.println(rightPtr + " " + (n-leftPtr));
		    			leftPtr = n - (rightPtr + 1);
		    			//System.out.println(rightPtr + " " + (n-leftPtr) + " " + (leftPtr));
		    		}
	    			if((pointRemain - timeLeft[leftPtr]) >= 0)
	    			{
	    				max = Math.max(max, (watch+leftPtr));
	    				System.out.println((watch+leftPtr));
	    			}*/
		    	}
	    	}
	    	
	    		
	    		
	    		/*
	    		int rightPoints = initialPenalty;
	    		int rightWatch = initialWatch + watchRight[i-2];
	    		
	    		int rightPointsLeft = timeL - ( rightPoints + timeRight[i-2] + (watchRight[i-2]*swipeT) );
	    		if(rightPointsLeft > 0)
	    		{
	    			//System.out.println("Lower bound : " + (i-2));
	    			//System.out.println("Upper bound : " + ((n-2)-(i-2)));
	    			int lowerBound = (i-2);
	    			int higherBound = ((n-2)-(i-2));
	    			int leftIdx = BS(rightPointsLeft, timeLeft, lowerBound, higherBound);
	    			
	    			int OMFG = Arrays.binarySearch(timeLeft, rightPointsLeft) + 1;

	    			if(indexRight[i-2]==indexLeft[leftIdx])
	    			{
	    				//System.out.println("Fucking hell.");
	    				continue;
	    			}
	    			
	    			if((rightPointsLeft - timeLeft[leftIdx]) >= 0)
	    			{
	    				max = Math.max(max, (rightWatch+watchLeft[leftIdx]));
	    				//System.out.println("Current max " + (rightWatch+timeLeft[leftIdx][1]));
	    			}
	    		}
	    		*/
	    	
	    	/*
	    	if(n-i-2>=0)
	    	{
	    		int leftPoints = initialPenalty;
	    		int leftWatch = initialWatch + watchLeft[(n-i-2)];// + timeRight[i-2][1];
	    		int leftPointsLeft = timeL - (leftPoints + timeLeft[(n-i-2)]) - ((watchLeft[(n-i-2)]*swipeT) );
	    		
	    		if(leftPointsLeft>0)
	    		{
	    			int lowerBound = (n-i-2);
	    			int higherBound = ((n-2)-((n-i-2)));
	    			
	    			int rightIdx = BS(leftPointsLeft, timeRight, lowerBound, higherBound);
	    			
	    			/*while(timeLeft[(n-i-2)][2]<=timeRight[rightIdx][2])
	    			{
	    				if(rightIdx==0) break;
	    				rightIdx --;
	    				//System.out.println("Offsetval : " + (rightIdx));
	    			}
	    			
	    			if(indexLeft[n-i-2]==indexRight[rightIdx])
	    			{
	    				//System.out.println("Fucking hell.");
	    				continue;
	    			}
	    			
	    			if((leftPointsLeft - timeRight[rightIdx]) >= 0)
	    			{
	    				max = Math.max(max, (leftWatch+watchRight[rightIdx]));
	    				//System.out.println(max);
	    			}
	    		}
	    		//System.out.println(i + " " + (timeLeft[(n-i-2)][0] - (timeLeft[(n-i-2)][1]*swipeT)));
	    		//System.out.println(leftPointsLeft);
	    	}
	    		*/
	    	
    		//int leftPointsLeft = timeL - (leftPoints + timeRight[i-2][0]) - (timeRight[i-2][1]*swipeT);
	    	
	    }
	    out.println(max);
		//}
		out.close();
	}
	
	public static int BS(int target, int [] values, int lo, int hi)
	{
		int mid = (lo + hi) / 2;
		int midItem = values[mid];

		if(values[hi] < target) return hi;
		if(values[lo] > target) return lo;
		
		do
		{
			if(target > midItem)
				lo = mid;
			else if(target < midItem)
				hi = mid;
			else 
				return mid;
			
			if(hi-lo <= 1) break;

			mid = (hi + lo)/2;
			midItem = values[mid];
			
		}while (lo < hi);
		
		if(mid-1>=0 && values[mid]>target)
		{
			return mid-1;
		}
		return mid;
	}
	
}




/*

	            if(currentInstruction != ' ' && prevInstruction != ' ' && currentInstruction == 'R' && prevInstruction == 'L' && input[rightPtr]!='-')
	            {
	            	//temp = ((input[rightPtr]=='w'?rotT:0)) + ((rightPtr + (input.length-leftPtr-1))*swipeT) + 1 + currentPenalty;
	            	temp = currRprevL;
	            	input[rightPtr]='-';
	            	rightPtr++;
	            }
	            else if(currentInstruction != ' ' && currentInstruction == 'R' && input[rightPtr]!='-')
	            {
	            	//temp = ((input[rightPtr]=='w'?rotT:0)) + swipeT + 1 + currentPenalty;
	            	temp = currR;
	            	input[rightPtr]='-';
	            	rightPtr ++;
	            }
	            else if(currentInstruction != ' ' && prevInstruction != ' ' && currentInstruction == 'L' && prevInstruction == 'R' && input[leftPtr]!='-')
	            {
	            	//temp = ((input[leftPtr]=='w'?rotT:0)) + ((rightPtr + (input.length-leftPtr-1))*swipeT) + 1 + currentPenalty;
	            	temp = currLprevR;
	            	input[leftPtr]='-';
	            	leftPtr--;
	            }
	            else if(currentInstruction != ' ' && currentInstruction == 'L' && input[leftPtr]!='-')
	            {
	            	//temp = ((input[leftPtr]=='w'?rotT:0)) + swipeT + 1 + currentPenalty;
	            	temp = currL;
	            	input[leftPtr]='-';
	            	leftPtr--;
	            }
	            
	            if(temp > timeL || (input[leftPtr]=='-' && input[rightPtr]=='-'))
	        	{
	            	max = ((max>watched)?max:watched);
	            	return;
	        	}
	            else if(currentInstruction != ' ')
	        	{
	            	currentPenalty = temp;
	            	watched ++;
	            }
	            
	            if(prevInstruction == 'L' && currentInstruction == 'R')
	            {
	            	
	            }
	            else if(prevInstruction )

*/