#include <bits/stdc++.h>
int solve(int n, int tMove, int tRotate, int tTotal, std::string s) {
  int cur = (n - 1) * tMove + n;
  for (int i = 0; i < n; ++i) {
    cur += (s[i] == 'w') * tRotate;
  }
  if (cur <= tTotal) {
    return n;
  }
  s += s;
  int lt = n, rt = n;
  cur = 1 + (s[n] == 'w') * tRotate;
  if (cur > tTotal) {
    return 0;
  }
  while (cur + 1 + tMove + (s[lt - 1] == 'w') * tRotate <= tTotal) {
    cur += 1 + tMove + (s[lt - 1] == 'w') * tRotate;
    --lt;
  }
  int answ = 0;
  while (lt <= n) {
    while (true) {
      int next = cur + 1 + tMove + (s[rt + 1] == 'w') * tRotate;
      next += std::min(n - lt, rt + 1 - n) * tMove;
      if (next <= tTotal) {
        cur = next - std::min(n - lt, rt + 1 - n) * tMove;
        ++rt;
      } else {
        break;
      }
    }
    answ = std::max(answ, rt - lt + 1);
    cur = cur - 1 - tMove - (s[lt] == 'w') * tRotate;
    ++lt;
  }
  return answ;
}
int main() {
  int n, tMove, tRotate, tTotal;
  while (std::cin >> n >> tMove >> tRotate >> tTotal) {
    std::string s;
    std::cin >> s;
    std::cout << solve(n, tMove, tRotate, tTotal, s) << std::endl;
  }
  return 0;
}
