#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long double PI = 3.141592653589793238462643383279502884197;
priority_queue<int, vector<int>, greater<int> > pq;
vector<int> v;
char s[500001];
int vec[500001];
int main() {
  int n, a, b, t;
  scanf("%d %d %d %d", &n, &a, &b, &t);
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    if (s[i] == 'w')
      vec[i] = b + 1;
    else
      vec[i] = 1;
  }
  int sum = -a, mav = 0;
  for (int i = 0; i < n; i++) {
    sum += vec[i];
    sum += a;
    if (sum <= t) mav = max(mav, i + 1);
  }
  if (mav == n) return !printf("%d", n);
  int cnt = 1, r = n;
  sum = vec[0];
  if (sum <= t) mav = max(mav, cnt);
  while (r && sum + vec[r - 1] + a <= t) {
    sum += vec[--r] + a;
    mav = max(mav, ++cnt);
  }
  for (int i = 1; i < n - 1; i++) {
    sum += 2 * a + vec[i];
    cnt++;
    while (r < n && sum > t) {
      sum -= vec[r++] + a;
      cnt--;
    }
    if (sum <= t) mav = max(mav, cnt);
  }
  int l = -1;
  cnt = 0;
  sum = -a;
  while (l < n && sum + vec[l + 1] + a <= t) {
    sum += vec[++l] + a;
    mav = max(mav, ++cnt);
  }
  for (int i = n - 1; i > 0; i--) {
    sum += 2 * a + vec[i];
    cnt++;
    while (l > 0 && sum > t) {
      sum -= vec[l--] + a;
      cnt--;
    }
    if (sum <= t) mav = max(mav, cnt);
  }
  printf("%d", mav);
}
