#include <bits/stdc++.h>
using namespace std;
const int nmax = 500005;
char s[nmax];
int pr[nmax], suf[nmax];
map<int, int> ts;
int main() {
  int n, a, b, t;
  scanf("%d", &n);
  ;
  scanf("%d%d%d", &a, &b, &t);
  ;
  getchar();
  gets(s);
  int tt = t - (s[0] == 'w' ? b : 0) - 1;
  int ans = tt >= 0;
  if (tt < 0) return cout << 0 << endl, 0;
  ;
  tt -= a;
  int tt1 = tt;
  for (int i = 1; i < n && tt > 0; i++) {
    pr[i] = pr[i - 1];
    int wei = (s[i] == 'w' ? b : 0) + 1;
    pr[i] += tt >= wei;
    ans = max(ans, pr[i]);
    tt -= wei;
    ts[tt1 - tt] = pr[i];
    tt -= a;
  }
  tt = t - (s[0] == 'w' ? b : 0) - 1 - a;
  for (int i = n - 1; i >= 1; i--) {
    suf[i] = suf[i + 1];
    int wei = (s[i] == 'w' ? b : 0) + 1;
    suf[i] += tt >= wei;
    ans = max(ans, suf[i]);
    tt -= wei;
    int back = ts[tt - (n - i)];
    ans = max(ans, back + suf[i]);
    tt -= a;
  }
  return cout << ans + 1 << endl, 0;
  ;
}
