#include <iostream>
#include <vector>
#include <algorithm>
#include <time.h>
#include <set>
#include <string>
#include <tuple>
#include <fstream>
#include <stdio.h>
#include <cstring>
#include <map>
#include <queue>
#include <bitset>

using namespace std;

#define vec vector
#define ALL(x) (x).begin(), (x).end()
#define mp make_pair
#define mt make_tuple

typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef pair< int, int > pii;

const int inf = 1000 * 1000 * 1000;
const ll inf64 = 1ll * inf * inf;
const double pi = acos(-1.0);

const int NMAX = 500500;
char buff[NMAX];

bool solve() {
	
	int n, a, b, T;
	scanf("%d %d %d %d", &n, &a, &b, &T);

	scanf("%s", &buff);
	string s = buff;

	int ans = 0;

	vec< int > pr(n), sf(n);

	for(int i = 0;i < n;i++) {
		if(i > 0) pr[i] = pr[i - 1] + a;
		if(s[i] == 'w') pr[i] += b;
		pr[i]++;
	}

	for(int i = n - 1;i >= 0;i--) {
		if(i + 1 < n) sf[i] = sf[i + 1];
		sf[i] += a;
		if(s[i] == 'w') sf[i] += b;
		sf[i]++;
	}

	for(int i = 0;i < n;i++) {
		if(pr[i] <= T) ans = max(ans, i + 1);
		if(sf[i] <= T) ans = max(ans, n - i);
	}

	for(int i = 0;i + 1 < n;i++) {
		int bl, br, bm;
		bl = i + 1;
		br = n - 1;
		while(br - bl > 1) {
			bm = (bl + br) / 2;
			if(pr[i] + i * a + sf[bm] <= T) br = bm;
			else bl = bm + 1;
		}
		if(pr[i] + i * a + sf[bl] <= T) ans = max(ans, i + 1 + n - bl);
		if(pr[i] + i * a + sf[br] <= T) ans = max(ans, i + 1 + n - br);
	}

	for(int i = n - 1;i > 0;i--) {
		int bl, br, bm;
		bl = 0;
		br = i - 1;
		while(br - bl > 1) {
			bm = (bl + br) / 2;
			if(sf[i] + (n - i) * a + pr[bm] <= T) bl = bm;
			else br = bm - 1;
		}
		if(sf[i] + (n - i) * a + pr[bl] <= T) ans = max(ans, bl + 1 + n - i);
		if(sf[i] + (n - i) * a + pr[br] <= T) ans = max(ans, br + 1 + n - i);
	}

	//for(int i = n - 2, j = n;i >= 0;i--) {
	//	while(j - 1 > i && pr[i] + i * a + sf[j - 1] <= T) { // add (j - 1)
	//		j--;
	//	}
	//	if(j < n && pr[i] + i * a + sf[j] <= T) ans = max(ans, i + 1 + n - j);
	//}

	//for(int i = 1, j = -1;i < n;i++) {
	//	while(j + 1 < i && sf[i] + (n - i) * a + pr[j + 1] <= T) { // add (j + 1)
	//		j++;
	//	}
	//	if(j > -1 && sf[i] + (n - i) * a + pr[j] <= T) ans = max(ans, j + 1 + n - i);
	//}

	printf("%d\n", ans);

	return true;
}

int main() {

	//while(solve());
	solve();	
	
	return 0;
}