#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
int n, m, a, b, t;
vector<int> lft, rgt, rot;
string s;
int main() {
  cin >> n >> a >> b >> t;
  cin >> s;
  rot.resize(n);
  lft.resize(n - 1);
  rgt.resize(n - 1);
  for (int i = 0; i < n; i++) rot[i] = s[i] == 'w' ? b : 0;
  t -= rot[0] + 1;
  if (t >= 0) m = 1;
  if (t > 0 && n > 1) {
    lft[0] = rot[n - 1] + a + 1;
    for (int i = 1; i < n - 1; i++)
      lft[i] = lft[i - 1] + rot[n - i - 1] + a + 1;
    rgt[0] = rot[1] + a + 1;
    for (int i = 1; i < n - 1; i++) rgt[i] = rgt[i - 1] + rot[i + 1] + a + 1;
    vector<int>::iterator it;
    int timelft;
    for (int i = 0; i < n - 1; i++) {
      if (rgt[i] <= t) m = max(m, i + 2);
      timelft = t - rgt[i] - (i + 1) * a;
      it = lower_bound(lft.begin(), lft.end(), timelft);
      if (*it == timelft || it != lft.begin()) {
        if (*it > timelft) --it;
        m = max(m, i + 2 + (int)(it - lft.begin() + 1));
      }
      if (lft[i] <= t) m = max(m, i + 2);
      timelft = t - lft[i] - (i + 1) * a;
      it = lower_bound(rgt.begin(), rgt.end(), timelft);
      if (*it == timelft || it != rgt.begin()) {
        if (*it > timelft) --it;
        m = max(m, i + 2 + (int)(it - rgt.begin() + 1));
      }
    }
  }
  cout << min(m, n) << endl;
  return 0;
}
