#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5 * 1e5 + 5;
int n, a, b, T;
char s[MAXN];
int rtime[MAXN];
int R[MAXN];
int L[MAXN];
int main() {
  scanf("%d %d %d %d", &n, &a, &b, &T);
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    if (s[i] == 'w') rtime[i] = b;
  }
  T -= rtime[0] + 1;
  if (T < 0) {
    puts("0");
    return 0;
  }
  int ans = 0;
  for (int i = 1; i < n; i++) {
    R[i] = R[i - 1] + a + 1 + rtime[i];
    L[i] = L[i - 1] + a + 1 + rtime[n - i];
  }
  for (int q = 0; q < 2; q++) {
    for (int k = 1; k < n; k++) {
      if (L[k] > T) break;
      ans = max(ans, k);
      int t = L[k] + a * k;
      int l = k - 1;
      int r = n - k;
      while (r - l > 1) {
        int m = (l + r) / 2;
        if (R[m] + t <= T)
          l = m;
        else
          r = m;
      }
      if (l >= k) ans = max(ans, l + k);
    }
    swap(L, R);
  }
  cout << ans + 1 << "\n";
  return 0;
}
