#include <bits/stdc++.h>
using namespace std;
void Emsawy() {}
const double PI = acos(-1.0);
const double eps = 1e-10;
const long long mod = 1e9 + 7, oo = 1e9;
int dx[]{1, -1, 0, 0, 1, -1, 1, -1};
int dy[]{0, 0, 1, -1, 1, -1, -1, 1};
int n, m, a, b, T;
double x;
const int N = 500000 + 5;
char g[N];
long long l[N], r[N];
int main() {
  Emsawy();
  while (cin >> n >> a >> b >> T) {
    for (int i = 0; i < n; i++) cin >> g[i];
    for (int i = 0; i < n; i++) {
      l[i] = (i ? a : 0) + (g[i] == 'w' ? b : 0) + 1;
      if (i) l[i] += l[i - 1];
    }
    for (int i = n - 1; i >= 0; i--) {
      r[i] = a + (g[i] == 'w' ? b : 0) + 1;
      if (i != n - 1) r[i] += r[i + 1];
    }
    reverse(r, r + n);
    int ans = 0;
    for (int i = 0; i < n; i++) {
      long long now = T - l[i];
      if (now < 0) continue;
      int s = 0, e = n - 1;
      while (s <= e) {
        int mid = (s + e) / 2;
        if (r[mid] > max(now - i * 1LL * a, now - (mid + 1) * 1LL * a))
          e = mid - 1;
        else
          s = mid + 1;
      }
      ans = max(ans, i + e + 2);
    }
    cout << min(n, ans) << endl;
  }
  return 0;
}
