#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  long long t, tiemporestante, res = 0;
  string s;
  cin >> n >> a >> b >> t >> s;
  char c = s[0];
  int it = 0, et = n - 1;
  vector<long long> needi(n), needd(n);
  if (s[0] == 'w') {
    needi[0] = 1 + b;
    needd[0] = 1 + b;
  } else {
    needi[0] = 1;
    needd[0] = 1;
  }
  it++;
  while (it < n && et >= 0) {
    needi[it] = 1 + a + needi[it - 1] + ((s[it] == 'w') ? b : 0);
    needd[it] = 1 + a + needd[it - 1] + ((s[et] == 'w') ? b : 0);
    it++;
    et--;
  }
  if (needi[n - 1] <= t) {
    cout << n << endl;
    return 0;
  }
  et = 0;
  for (it = 0; needi[it] <= t; it++)
    ;
  res = max(res, long long(it));
  for (it = it - 1; it >= 0; it--) {
    tiemporestante = t - (needi[it] + it * a);
    while (needd[++et] <= tiemporestante)
      ;
    et--;
    res = max(res, long long(1 + it + et));
  }
  reverse(s.begin(), s.end());
  s = c + s;
  et = 0;
  for (it = 0; needd[it] <= t; it++)
    ;
  res = max(res, long long(it));
  for (it = it - 1; it >= 0; it--) {
    tiemporestante = t - (needd[it] + it * a);
    while (needi[++et] <= tiemporestante)
      ;
    et--;
    res = max(res, long long(1 + it + et));
  }
  cout << res << endl;
}
