#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
const int S = 10000;
const long long mod = (long long)1e9 + 7;
bool vis[N];
int wd[N], wi[N];
int main() {
  int n, a, b, t;
  string s;
  cin >> n >> a >> b >> t;
  cin >> s;
  int res = 0, cur = 0, der = 0, izq = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      wd[i] = s[i] == 'w';
    } else {
      wd[i] = wd[i - 1] + (s[i] == 'w' ? 1 : 0);
    }
  }
  for (int i = n - 1; i >= 1; i--) {
    if (i == n - 1)
      wi[i] = s[i] == 'w';
    else
      wi[i] = wi[i + 1] + (s[i] == 'w' ? 1 : 0);
  }
  while (der < n && (der * a + der + 1 + wd[der] * b) <= t) {
    cur++;
    der++;
    res = max(res, der);
  }
  if (der < n) {
    izq = n - 1;
    while (der >= 0) {
      while (izq > der && (der)*a + der + 1 + wd[der] * b + (n - izq) * a +
                                  (n - izq) + wi[izq] * b +
                                  (der > 0 ? min(n - izq, der) * a : 0) <=
                              t) {
        res = max(res, der + 1 + (n - izq));
        cur++;
        izq--;
      }
      if (cur > 0) {
        der--;
        cur--;
      } else
        break;
    }
  }
  cout << res << '\n';
}
