#include <bits/stdc++.h>
using namespace std;
int n;
int a, b, t;
string s;
int rr[600001];
int ll[600001];
int main(void) {
  scanf("%d%d%d%d", &n, &a, &b, &t);
  cin >> s;
  int res = 0, cnt = 0;
  int nt = 0;
  for (int i = 0; i < n; i++) {
    ll[i] = 1000000007;
    rr[i] = 1000000007;
  }
  for (int i = 0; i < n; i++) {
    nt++;
    if (s[i] == 'w') nt += b;
    if (nt > t) break;
    rr[i] = nt;
    cnt++;
    nt += a;
  }
  res = max(res, cnt);
  cnt = 0;
  nt = 0;
  for (int i = 0; i < n; i++) {
    nt++;
    if (s[(n - i) % n] == 'w') nt += b;
    if (nt > t) break;
    ll[i] = nt;
    cnt++;
    nt += a;
  }
  res = max(res, cnt);
  for (int i = 1; i < n; i++) {
    ll[i] -= ll[0];
    rr[i] -= rr[0];
  }
  ll[0] = 0;
  rr[0] = 0;
  cnt = 0;
  nt = 0;
  for (int i = 0; i < n; i++) {
    nt++;
    if (s[i] == 'w') nt += b;
    if (nt > t) break;
    int k = upper_bound(ll, ll + n - i - 1, t - nt - a * i) - ll;
    cnt++;
    res = max(res, cnt + max(k - 1, 0));
    nt += a;
  }
  cnt = 0;
  nt = 0;
  for (int i = 0; i < n; i++) {
    nt++;
    if (s[(n - i) % n] == 'w') nt += b;
    if (nt > t) break;
    int k = upper_bound(rr, rr + n - i - 1, t - nt - a * i) - rr;
    cnt++;
    res = max(res, cnt + max(k - 1, 0));
    nt += a;
  }
  printf("%d\n", res);
  return 0;
}
