#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 5e5 + 10;
const int inf = 2e9;
const double eps = 1e-7;
const long long INF = (long long)1e18;
int n, adj, b, tim;
char a[N];
vector<long long> x, y;
int main() {
  cin >> n >> adj >> b >> tim;
  cin >> a;
  int ans = 0;
  long long t = 0, m;
  int cnt = 0;
  if (a[0] == 'w') {
    t = t + b;
  }
  t = t + 1;
  if (t <= 1ll * (tim))
    ans++;
  else {
    cout << 0;
    return 0;
  }
  t += adj;
  m = t;
  t = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] == 'w') {
      t += b;
    }
    t += 1;
    x.push_back(t);
    t += adj;
  }
  t = 0;
  for (int i = n - 1; i > 0; i--) {
    if (a[i] == 'w') {
      t += b;
    }
    t += 1;
    y.push_back(t);
    t += adj;
  }
  cnt = 0;
  ans = 1;
  for (int i = 0; i < n - 1; i++) {
    if (x[i] <= 1ll * tim) {
      ans = max(ans, i + 1);
      if (x[i] + 1ll * (i + 2) * adj <= 1ll * tim) {
        long long left = 1ll * tim - 1ll * (i + 2) * adj - x[i];
        int pos = upper_bound(y.begin(), y.end(), left) - y.begin();
        ans = max(ans, i + 1 + pos + 1);
      }
    } else
      break;
  }
  for (int i = 0; i < n - 1; i++) {
    if (y[i] <= 1ll * tim) {
      ans = max(ans, i + 1);
      if (y[i] + 1ll * (i + 2) * adj <= 1ll * tim) {
        long long left = 1ll * tim - 1ll * (i + 2) * adj - x[i];
        int pos = upper_bound(x.begin(), x.end(), left) - x.begin();
        ans = max(ans, i + 1 + pos + 1);
      }
    } else
      break;
  }
  cout << min(ans, n);
  return 0;
}
