#include <bits/stdc++.h>
using namespace std;
int photo1[500005], photo2[500005];
int main() {
  int n, a, b, T;
  while (cin >> n >> a >> b >> T) {
    string s;
    cin >> s;
    int len = s.size();
    memset(photo1, 0, sizeof(photo1));
    memset(photo2, 0, sizeof(photo2));
    for (int i = 0; i < len; i++) {
      if (s[i] == 'w') {
        if (i == 0)
          photo1[i + 1] = b + 1;
        else
          photo1[i + 1] += photo1[i] + a + b + 1;
      } else {
        if (i == 0)
          photo1[i + 1] = 1;
        else
          photo1[i + 1] += photo1[i] + a + 1;
      }
    }
    for (int i = len - 1; i >= 0; i--) {
      if (s[i] == 'w') {
        if (len - 1 - i == 0)
          photo2[len - i] = b + 1;
        else
          photo2[len - i] += photo2[len - 1 - i] + a + b + 1;
      } else {
        if (len - 1 - i == 0)
          photo2[len - i] = 1;
        else
          photo2[len - i] += photo2[len - 2 - i] + a + 1;
      }
    }
    int maxx = 0;
    if (photo1[1] > T) {
      cout << 0 << endl;
      continue;
    }
    if (photo1[len] <= T) {
      cout << len << endl;
      continue;
    }
    int pos = lower_bound(photo1 + 1, photo1 + len + 1, T) - photo1;
    if (photo1[pos] > T) pos--;
    maxx = pos;
    for (int i = pos; i >= 1; i--) {
      int temp = T - photo1[i] - (i)*a;
      if (temp <= 0) continue;
      if (photo2[1] > temp) {
        break;
      }
      int pos2 = lower_bound(photo2 + 1, photo2 + len - i - 1, temp) - photo2;
      if (photo2[pos2] > temp) pos2--;
      maxx = max(maxx, i + pos2);
    }
    cout << maxx << endl;
  }
  return 0;
}
