#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 7;
int n, a, b, T;
char s[maxn];
int pre[maxn], suf[maxn];
int solve() {
  int res = 0;
  pre[1] = s[1] == 'w' ? b + 1 : 1;
  for (int i = 2; i < int(n + 1); i++) {
    if (s[i] == 'w') {
      pre[i] = pre[i - 1] + a + b + 1;
    } else {
      pre[i] = pre[i - 1] + a + 1;
    }
  }
  for (int i = n + 1 - 1; i >= int(1); i--) {
    if (s[i] == 'w') {
      suf[i] = suf[i + 1] + a + b + 1;
    } else {
      suf[i] = suf[i + 1] + a + 1;
    }
  }
  suf[1] = suf[2] + pre[1];
  for (int p = n; p; p--) {
    if (T < pre[p]) continue;
    int l = p, r = n + 1;
    while (l + 1 < r) {
      int m = (l + r) >> 1;
      if (T >= pre[p] + suf[m] + min((p - 1) * a, (n - m + 1) * a))
        r = m;
      else
        l = m;
    }
    res = max(res, p + n - r + 1);
  }
  return res;
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", s + 1);
  printf("%d\n", solve());
  return 0;
}
