#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  t--;
  if (s[0] == 'w') t -= b;
  int k = 0;
  int ert = 0;
  int maxi = 0;
  int v = 0;
  if (ert <= t) {
    maxi = v - k + 1;
  }
  while (ert < t && k > -n) {
    k--;
    ert += a + 1;
    if (s[(k + n) % n] == 'w') ert += b;
    if (ert <= t) {
      maxi = v - k + 1;
    }
  }
  while (k <= 0 && v < n) {
    if (ert + (min(abs(k), abs(v)) * a) > t) {
      ert -= a + 1;
      if (s[(k + n) % n] == 'w') ert -= b;
      k++;
    } else {
      if (ert + (min(abs(k), abs(v)) * a) <= t) maxi = max(maxi, v - k + 1);
      maxi = max(maxi, v - k + 1);
      v++;
      ert += a + 1;
      if (s[(v + n) % n] == 'w') ert += b;
      if (ert + (min(abs(k), abs(v)) * a) <= t) maxi = max(maxi, v - k + 1);
    }
    if (ert + (min(abs(k), abs(v)) * a) <= t) maxi = max(maxi, v - k + 1);
  }
  maxi = min(maxi, n);
  cout << maxi << endl;
  return 0;
}
