/**
 * http://codeforces.com/problemset/problem/650/B
 */


import java.io.FileNotFoundException;
import java.util.Scanner;

public class ImagePreview {

	public static void main(String[] args) throws FileNotFoundException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int moveTime = sc.nextInt();
		int turnTime = sc.nextInt();
		int availableTime = sc.nextInt();
		String orientations = sc.next();
		sc.close();
		
		int[] watchTimes = new int[n];
		watchTimes[0] = ((orientations.charAt(0) == 'w') ? turnTime : 0) + 1;
		if(watchTimes[0] > availableTime) 
			System.out.println(0); // cant even watch first image
		else {
			int rightPos = 0;
			for(int i = 1; i < n; ++i) {
				watchTimes[i] = watchTimes[i-1] + ((orientations.charAt(i) == 'w') ? turnTime : 0) + 1 + moveTime;
				if(watchTimes[i] <= availableTime) rightPos = i;
				else break;
			}
			if(rightPos == n - 1) { // can watch all images
				System.out.println(n);
			} else {
				int max = rightPos + 1; // can watch images 0 to rightPos
				int leftTime = moveTime * rightPos + ((orientations.charAt(n - 1) == 'w') ? turnTime : 0) + 1 + moveTime;
				int leftPos = n - 1;
				while(rightPos >= 0) {
					
					while((leftPos > 0) && (watchTimes[rightPos] + leftTime <= availableTime)) {
						leftPos--;
						leftTime += ((orientations.charAt(leftPos) == 'w') ? turnTime : 0) + 1 + moveTime;
					} // leftPos exclusive

					
					if(max < rightPos + 1 + (n - leftPos - 1)) max = rightPos + 1 + (n - leftPos - 1);
					rightPos--;
					leftTime -= moveTime;
				}
				System.out.println(max);
			}
		}
	}

}
