#include <bits/stdc++.h>
using namespace std;
int in[500001], rsm[500001], sm[500001], a, b, n;
int goleft(int l, int r, int t) {
  t -= (r - l) * a;
  if (t <= 0) return 0;
  l = n;
  t -= a;
  int md, ret = 0;
  if (rsm[r + 1] <= t) return l - r;
  if (rsm[n] + a > t) return 0;
  while (l - r > 1) {
    md = (l + r) / 2;
    if (rsm[md] <= t)
      l = md;
    else
      r = md;
  }
  return n - l + 1;
}
int goright(int l, int r, int t) {
  if (l != r)
    t -= (n - l + 1) * a;
  else
    l = n + 1;
  if (t <= 0) return 0;
  int md;
  if (sm[l - 1] - sm[1] <= t) {
    if (l == n + 1)
      return l - r - 1;
    else
      return l - r;
  }
  if (sm[r + 1] - sm[1] > t) return 0;
  while (l - r > 1) {
    md = (l + r) / 2;
    if (sm[md] - sm[1] <= t)
      r = md;
    else
      l = md;
  }
  return r - 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int i, j, x, cnt = 0, m, y, t, tim;
  cin >> n >> a >> b >> t;
  string s;
  int lmst, rmst, tl, tr, gr, gl, mx, ngl, ngr;
  cin >> s;
  for (i = 0; i <= n - 1; i++) {
    if (s[i] == 'w')
      in[i + 1] = b;
    else
      in[i + 1] = 0;
  }
  sm[1] = 1 + in[1];
  rsm[n] = 1 + in[n];
  for (i = 2; i <= n; i++) sm[i] = sm[i - 1] + in[i] + 1 + a;
  for (i = n - 1; i >= 1; i--) rsm[i] = in[i] + rsm[i + 1] + a + 1;
  lmst = 1;
  rmst = 1;
  tim = t;
  while (t > 0 && mx < n) {
    t -= (1 + in[rmst]);
    if (t >= 0)
      cnt++;
    else
      break;
    x = cnt;
    x += goleft(1, rmst, t);
    rmst++;
    t -= a;
    mx = max(mx, x);
  }
  cnt = 0;
  t = tim;
  lmst = 1;
  rmst = 1;
  while (t > 0 && mx < n) {
    t -= (1 + in[lmst]);
    if (t >= 0)
      cnt++;
    else
      break;
    x = cnt;
    x += goright(lmst, 1, t);
    if (lmst == 1)
      lmst = n;
    else
      lmst--;
    t -= a;
    mx = max(mx, x);
  }
  cout << mx;
}
