#include <bits/stdc++.h>
using namespace std;
int n, a, b, t;
string s;
vector<int> ri, le, rib, leb;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> a >> b >> t >> s;
  ri.resize(n);
  le.resize(n);
  rib.resize(n);
  leb.resize(n);
  if (n == 1) {
    cout << (1 + (s[0] == 'w' ? b : 0) <= t ? 1 : 0) << endl;
    return 0;
  }
  ri[0] = le[0] = 1 + (s[0] == 'w' ? b : 0);
  rib[0] = leb[0] = 0;
  for (int i = 1; i < n; ++i) {
    ri[i] = ri[i - 1] + a + 1 + (s[i] == 'w' ? b : 0);
    rib[i] = rib[i - 1] + a;
  }
  le[n - 1] = le[0] + a + 1 + (s[n - 1] == 'w' ? b : 0);
  leb[n - 1] = a;
  for (int i = n - 2; i > 0; --i) {
    le[i] = le[i + 1] + a + 1 + (s[i] == 'w' ? b : 0);
    leb[i] = leb[i + 1] + a;
  }
  if (ri[n - 1] <= t || le[1] <= t) {
    cout << n << endl;
    return 0;
  }
  if (ri[0] > t) {
    cout << 0 << endl;
    return 0;
  }
  int res = 1;
  for (int i = 0; i < n; ++i) {
    if (ri[i] <= t) res = max(res, i + 1);
  }
  for (int i = 1; i < n; ++i) {
    if (le[i] <= t) res = max(res, n - i + 1);
  }
  int j = 1;
  for (int i = 1; i < n; ++i) {
    int h = ri[i] + rib[i] - le[0];
    while (j < n && h + le[j] > t) ++j;
    if (h + le[j] <= t) res = max(res, n - j + i + 1);
  }
  j = n - 1;
  for (int i = n - 1; i > 0; --i) {
    int h = le[i] + leb[i] - ri[0];
    while (j > 0 && h + ri[j] > t) --j;
    if (h + ri[j] <= t) res = max(res, n - i + j + 1);
  }
  cout << min(res, n) << endl;
  return 0;
}
