#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  int lft[n], rht[n];
  for (int i = 0; i < n; i++) lft[i] = rht[i] = 0;
  int tt = 0;
  int res = 0;
  for (int i = 0; i < n && tt <= t; i++) {
    int r = (s[i] == 'w') ? b : 0;
    tt += r + 1;
    if (tt <= t) lft[i] = tt;
    tt += a;
  }
  tt = a;
  for (int i = n - 1; i >= 0 && tt < t; i--) {
    int r = (s[i] == 'w') ? b : 0;
    tt += r + 1;
    if (tt <= t) rht[i] = tt;
    tt += a;
  }
  if (lft[n - 1] != 0) {
    cout << n;
    return 0;
  }
  int l, r;
  for (l = 0; l < n && lft[l] > 0; l++)
    ;
  l--;
  for (r = n - 1; r >= 0 && rht[r] > 0; r--)
    ;
  r++;
  res = max(l + 1, n - r);
  int i = 0, j = r;
  while (rht[j] > t - lft[0]) j++;
  if (j < n) res = max(res, 1 + n - j);
  i++;
  while (i <= l && j < n) {
    while (j < n && rht[j] > (t - lft[i] - (i * a))) j++;
    if (j < n) res = max(res, i + 1 + n - j);
    i++;
  }
  i = l;
  j = n - 1;
  while (i >= 0 && j >= r) {
    while (i >= 0 && lft[i] > (t - rht[j] - (n - j) * a)) i--;
    if (i >= 0) res = max(res, n - j + i + 1);
    j--;
  }
  cout << res;
}
