#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
char c[N];
int main() {
  int n, a, b, t;
  scanf("%d%d%d%d\n%s", &n, &a, &b, &t, c);
  int mxr = 0, sum = -a, res = 0;
  while (sum <= t && mxr < n) {
    sum += a + 1;
    if (c[mxr] == 'w') sum += b;
    ++mxr;
  }
  --mxr;
  if (sum > t) {
    sum -= a + 1;
    if (c[mxr] == 'w') sum -= b;
  }
  --mxr;
  res = max(res, mxr + 1);
  for (int i = n - 1; i > 0 && mxr >= 0; --i) {
    sum += 2 * a + 1;
    if (c[i] == 'w') sum += b;
    while (sum > t && mxr >= 0) {
      sum -= a + 1;
      if (c[mxr] == 'w') sum -= b;
      --mxr;
    }
    if (sum <= t) res = max(res, n - i + mxr + 1);
  }
  for (int i = 1; i < n - i; ++i) swap(c[i], c[n - i]);
  sum = -a;
  mxr = 0;
  while (sum <= t && mxr < n) {
    sum += a + 1;
    if (c[mxr] == 'w') sum += b;
    ++mxr;
  }
  --mxr;
  if (sum > t) {
    sum -= a + 1;
    if (c[mxr] == 'w') sum -= b;
  }
  --mxr;
  res = max(res, mxr + 1);
  for (int i = n - 1; i > 0 && mxr >= 0; --i) {
    sum += 2 * a + 1;
    if (c[i] == 'w') sum += b;
    while (sum > t && mxr >= 0) {
      sum -= a + 1;
      if (c[mxr] == 'w') sum -= b;
      --mxr;
    }
    if (sum <= t) res = max(res, n - i + mxr + 1);
  }
  printf("%d\n", min(res, n));
}
