#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  vector<int> v(n * 2 - 1);
  int lbound = n - 1;
  int prev = 0;
  while (lbound >= 0) {
    int curr = prev + 1;
    int ind = (lbound == n - 1 ? 0 : lbound + 1);
    if (s[ind] == 'w') curr += b;
    if (curr > t) break;
    v[lbound] = curr;
    --lbound;
  }
  int rbound = n - 1;
  prev = 0;
  while (rbound < n * 2 - 1) {
    int curr = prev + 1;
    int ind = rbound - n + 1;
    if (s[ind] == 'w') curr += b;
    if (curr > t) break;
    v[rbound] = curr;
    ++rbound;
  }
  int r = n - 1;
  int curr = 0;
  while (r < rbound) {
    int test = curr + v[r];
    if (r > n - 1) test += a;
    if (test > t) break;
    curr = test;
    ++r;
  }
  int mx = r - n + 1;
  if (mx == n) {
    printf("%d\n", mx);
    return 0;
  }
  int l = n - 1;
  while (r > n) {
    --r;
    curr -= v[r] + a;
    int test = curr + (r - l) * a + v[l - 1];
    if (test > t) {
      continue;
    }
    --l;
    curr = test;
    while (l > 0) {
      int test = curr + v[l - 1] + a;
      if (test > t) break;
      --l;
      curr = test;
    }
    if (r - l > mx) mx = r - l;
    break;
  }
  while (r > n) {
    --r;
    curr -= v[r] + 2 * a;
    while (l > 0) {
      int test = curr + v[l - 1] + a;
      if (test > t) break;
      --l;
      curr = test;
    }
    if (r - l > mx) mx = r - l;
  }
  printf("%d\n", mx);
  return 0;
}
