#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, T;
  cin >> n >> a >> b >> T;
  string ph;
  cin >> ph;
  if (n == 1) {
    int t = (ph[0] == 'w') * b + 1;
    cout << (t <= T ? 1 : 0);
    exit(0);
  }
  auto view = [&ph, &b](int i) { return (ph[i] == 'w') * b + 1; };
  vector<int64_t> l2r(n, 0), r2l(n, 0);
  l2r[0] = view(0);
  for (int i = 1; i < n; ++i) {
    l2r[i] = l2r[i - 1] + a + view(i);
  }
  if (l2r[0] > T) {
    cout << 0;
    exit(0);
  }
  if (l2r[n - 1] <= T) {
    cout << n;
    exit(0);
  }
  r2l[0] = 0;
  r2l[n - 1] = r2l[0] + a + view(n - 1);
  for (int i = n - 2; i > 0; --i) {
    r2l[i] = r2l[i + 1] + a + view(i);
  }
  int ans = 0, bw = 1;
  for (int i = 1; i < n; ++i) {
    while (bw < n && l2r[i] + (i - 1) * a + r2l[bw] > T) {
      ++bw;
    }
    if (bw != n) {
      ans = max(ans, i + 1 + (n - bw));
    }
  }
  cout << ans;
  return 0;
}
