#include <bits/stdc++.h>
using namespace std;
const int N = int(6e5);
int n, a, b, T;
char second[N];
long long pref[N], suf[N];
int ans;
void get() {
  for (int i = 1; i <= n; i++) {
    pref[i] = (pref[i - 1] + 1);
    if (second[i] == 'w') pref[i] += b;
    if (i > 1) pref[i] += a;
  }
  for (int i = n; i > 0; i--) {
    suf[i] = suf[i + 1] + 1 + a;
    if (second[i] == 'w') suf[i] += b;
  }
  int j = 1;
  for (int i = 1; i <= n; i++) {
    if (pref[i] <= T)
      ans = max(ans, i);
    else
      break;
    while (j <= n && pref[i] + (i - 1) * a + suf[j] > T) j++;
    ans = max(ans, min(n, n - j + 1 + i));
  }
}
int main() {
  scanf("%d%d%d%d\n", &n, &a, &b, &T);
  scanf("%s", second + 1);
  get();
  reverse(second + 2, second + n + 1);
  get();
  cout << ans;
  return 0;
}
