#include <bits/stdc++.h>
using namespace std;
int readint() {
  char c;
  while (c = getchar(), (c < '0' || c > '9') && c != '-')
    ;
  bool flag = (c == '-');
  if (flag) c = getchar();
  int x = 0;
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - 48;
    c = getchar();
  }
  return flag ? -x : x;
}
inline string tos(int x) {
  string s;
  while (x) s = (char)(x % 10 + '0') + s, x /= 10;
  return s;
}
inline int pt(int a[], int l, int r) {
  int p, i, j;
  p = a[l];
  i = l;
  j = r + 1;
  for (;;) {
    while (a[++i] < p)
      if (i >= r) break;
    while (a[--j] > p)
      if (j <= l) break;
    if (i >= j)
      break;
    else
      swap(a[i], a[j]);
  }
  if (j == l) return j;
  swap(a[l], a[j]);
  return j;
}
inline void q_sort(int a[], int l, int r) {
  int q;
  if (r > l) {
    q = pt(a, l, r);
    q_sort(a, l, q - 1);
    q_sort(a, q + 1, r);
  }
}
int needtime[500005], n, a, b, t;
string s;
int main() {
  ios_base::sync_with_stdio(false);
  int i, j, ans = 0;
  int nowneed = 0;
  cin >> n >> a >> b >> t;
  cin >> s;
  for (i = 0; i < n; i++) needtime[i + 1] = needtime[i] + (s[i] == 'w') * b + 1;
  int li, ri;
  for (li = n - 1, ri = n - 1; ri > -1; ri--) {
    while (li > 1 &&
           needtime[li] + nowneed +
                   (li - 1 + n - 1 - ri + min(li - 1, n - 1 - ri)) * a >
               t)
      li--;
    if (needtime[li] + nowneed +
            (li - 1 + (n - 1 - ri) + min(li - 1, n - 1 - ri)) * a <=
        t)
      ans = max(ans, min(n, li + (n - 1 - ri)));
    nowneed += (s[ri] == 'w') * b + 1;
  }
  cout << ans << endl;
  return 0;
}
