#include <bits/stdc++.h>
using namespace std;
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
int const maxn = 500005;
int lft[maxn];
int righ[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  for (int i = 0; i < maxn; ++i) lft[i] = righ[i] = 1000000000;
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  lft[0] = s[0] == 'w' ? b + 1 : 1;
  for (int i = 1; i < n; ++i) {
    lft[i] = lft[i - 1] + 1;
    if (s[i] == 'w') lft[i] += b;
  }
  righ[n] = 0;
  for (int i = n - 1; i >= 0; --i) {
    righ[i] = righ[i + 1] + 1;
    if (s[i] == 'w') righ[i] += b;
  }
  if (lft[0] > t) {
    cout << 0 << '\n';
    exit(0);
  };
  int l = n;
  while (l > 0 && righ[l - 1] + lft[0] + a * (n - l + 1) <= t) --l;
  int ans = n - l + 1;
  int r = 0;
  while (lft[r + 1] + a * (r + 1) <= t) ++r;
  if (r + 1 > ans) ans = r + 1;
  for (int r = 1; r < n; ++r) {
    if (lft[r] + 2LL * a * r > t) break;
    while (lft[r] + 2LL * a * r + righ[l] + (n - l) * a > t) ++l;
    if (r + n - l + 1 > ans) ans = r + n - l + 1;
  }
  r = n - 1;
  for (int l = n - 1; l >= 0; --l) {
    if (lft[0] + righ[l] + 2LL * a * (n - l) > t) break;
    while (lft[r] + righ[l] + 2LL * a * (n - l) + r * a > t) --r;
    if (r + n - l + 1 > ans) ans = r + n - l + 1;
  }
  cout << min(ans, n) << endl;
}
