#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) {
    char s[500005];
    scanf("%s", s + 1);
    int pos, pos2;
    memset(photo1, 0, sizeof(photo1));
    memset(photo2, 0, sizeof(photo2));
    for (int i = 1; i <= n; i++) {
      if (s[i] == 'w') {
        if (i == 1)
          photo1[i] = b + 1;
        else
          photo1[i] = photo1[i - 1] + a + b + 1;
      } else {
        if (i == 1)
          photo1[i] = 1;
        else
          photo1[i] = photo1[i - 1] + a + 1;
      }
    }
    int maxx = 0;
    if (s[1] == 'w')
      photo2[1] = b + 1;
    else
      photo2[1] = 1;
    for (int i = n; i >= 2; i--) {
      if (s[i] == 'w') {
        photo2[n - i + 2] = photo2[n - i + 1] + a + b + 1;
      } else {
        photo2[n - i + 2] = photo2[n - i + 1] + a + 1;
      }
    }
    if (photo1[1] > T) {
      cout << 0 << endl;
      continue;
    }
    if (photo1[n] <= T) {
      cout << n << endl;
      continue;
    }
    pos = upper_bound(photo1 + 1, photo1 + n + 1, T) - photo1;
    pos--;
    maxx = max(pos, maxx);
    for (int i = pos; i >= 2; i--) {
      int temp = T - photo1[i] - (i)*a + a + 1;
      if (temp <= 0) continue;
      pos2 = upper_bound(photo2 + 2, photo2 + n + 2 - pos, temp) - photo2;
      pos2--;
      maxx = max(maxx, pos2 + i - 1);
    }
    pos2 = upper_bound(photo2 + 1, photo2 + n + 1, T) - photo2;
    pos2--;
    maxx = max(maxx, pos2);
    for (int i = pos2; i >= 2; i--) {
      int temp = T - photo2[i] - (i)*a + a + 1;
      if (temp <= 0) continue;
      pos = upper_bound(photo1 + 2, photo1 + n + 2 - pos2, temp) - photo1;
      pos--;
      maxx = max(maxx, pos + i - 1);
    }
    cout << maxx << endl;
  }
  return 0;
}
