#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long a, b;
  long long T;
  cin >> n >> a >> b >> T;
  string s;
  cin >> s;
  bool c[n];
  for (int i = 0; i < n; i++) c[i] = (s[i] == 'w');
  long long l[n];
  l[0] = 1 + b * c[0];
  for (int i = 1; i < n; i++) {
    l[i] = l[i - 1] + a + 1 + b * c[i];
  }
  long long r[n];
  r[0] = 1 + b * c[n - 1];
  for (int i = 1; i < n; i++) {
    r[i] = r[i - 1] + a + 1 + b * c[n - i - 1];
  }
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    long long t = T;
    if (l[i] > t) break;
    t -= l[i];
    long long now = i + 1;
    if (a * now > t) {
      ans = max(ans, now);
      continue;
    }
    t -= a * now;
    now += upper_bound(r, r + n, t) - r;
    if (now > n) now = n;
    ans = max(ans, now);
  }
  l[0] = 1 + b * c[0];
  for (int i = 1; i < n; i++) {
    l[i] = l[i - 1] + a + 1 + b * c[n - i];
  }
  r[0] = 1 + b * c[1];
  for (int i = 1; i < n - 1; i++) {
    r[i] = r[i - 1] + a + 1 + b * c[i + 1];
  }
  for (int i = 0; i < n; i++) {
    long long t = T;
    if (l[i] > t) break;
    t -= l[i];
    long long now = i + 1;
    if (a * now > t) {
      ans = max(ans, now);
      continue;
    }
    t -= a * now;
    now += upper_bound(r, r + n, t) - r;
    if (now > n) now = n;
    ans = max(ans, now);
  }
  cout << ans;
  return 0;
}
