/* TEST CASE
input
4 2 3 10
wwhw
output
2

input
5 2 4 1000
hhwhh
output
5

input
3 1 100 10
whw
output
0

input
5 2 4 13
hhwhh
output
4

Input
5 2 4 13
hhhwh
Output
3
Answer
4

*/
var n;
var swipeTime;
var rotateTime;
var needRotate;

function maxViewedPicture(totalTime) {
	var ret;
	var i;
	var viewCount = 0;
	var timeSpent = 0;
	var rev = n - 1, last;
	var t = 0;
	
	for (i = 0; i < n && timeSpent + t <= totalTime; i++) {
		timeSpent += t;
		t = 1;
		if (i > 0) {
			t += swipeTime;
		}
				
		if (needRotate[i]) {
			t += rotateTime;
		}
		
		if (timeSpent + t <= totalTime) {
			last = i;
			viewCount++;
		}
	}
	
	ret = viewCount;
	if (ret > 0 && ret < n) {
		for (var terminal = last + 1; terminal > 0; terminal--) {
			// decrement
			if (terminal <= last) {
				viewCount--;
				timeSpent -= 1 + swipeTime;
				if (needRotate[terminal]) {
					timeSpent -= rotateTime;
				}
			}
			// go reverse
			t = 1 + swipeTime;
			if (needRotate[rev]) {
				t += rotateTime;
			}
			//DEBUG:print("terminal - 1 =", terminal - 1, "n - rev = ", n - rev);
			while (timeSpent + swipeTime * Math.min(terminal - 1, n - rev) + t <= totalTime) {
				viewCount++;
				timeSpent += t;
				t = 1 + swipeTime;
				rev--;
				if (needRotate[rev]) {
					t += rotateTime;
				}
			}
			
			if (viewCount > ret) {
				ret = viewCount;
			}
		} 
	}

	return ret;
}

function main() {
	var splitted = readline().split(' ');
	n = parseInt(splitted[0]);
	swipeTime = parseInt(splitted[1]);
	rotateTime = parseInt(splitted[2]);
	totalTime = parseInt(splitted[3]);
	splitted = readline();
	needRotate = new Array(n);
	for (var i = 0; i < n; i++) {
		needRotate[i] = (splitted[i] == 'w');
	}

	var answer = maxViewedPicture(totalTime); 
	print(answer);
}

main();
