#include <bits/stdc++.h>
using namespace std;
int l, r, n, m, x, y, z, w, k, mx, i, j, t, a, b, f[100002], dpl[100002],
    dpr[100002], o;
char u;
int main() {
  cin >> n >> a >> b >> t;
  for (i = 1; i <= n; i++) {
    cin >> u;
    if (u == 'w')
      f[i] = 0;
    else
      f[i] = 1;
  }
  if (!f[1] && 1 + b > t) {
    cout << 0 << endl;
    return 0;
  }
  if (!f[1]) t -= b;
  t -= 1;
  mx = 1;
  for (i = 2; i <= n; i++) {
    if (f[i])
      dpr[i] = 1 + dpr[i - 1] + a;
    else
      dpr[i] = 1 + b + dpr[i - 1] + a;
  }
  for (i = n; i >= 2; i--) {
    if (f[i]) {
      dpl[i] = 1 + dpl[i + 1] + a;
    } else {
      dpl[i] = 1 + b + dpl[i + 1] + a;
    }
  }
  for (i = 2; i <= n && dpr[i] <= t; i++) {
    x = n + 1;
    mx = max(i, mx);
    o = t - dpr[i] - a * (i - 1);
    if (o <= 0) break;
    l = i + 1;
    r = n;
    while (l <= r) {
      w = (l + r) / 2;
      if (dpl[w] <= o) {
        x = w;
        r = w - 1;
      } else {
        l = w + 1;
      }
    }
    mx = max(mx, i + n - x + 1);
  }
  for (i = n; i >= 2 && dpl[i] <= t; i--) {
    x = 0;
    mx = max(mx, n - i + 2);
    o = t - dpl[i] - a * (n - i + 1);
    if (o <= 0) break;
    l = 2;
    r = i - 1;
    while (l <= r) {
      w = (l + r) / 2;
      if (dpr[w] <= o) {
        x = w;
        l = w + 1;
      } else {
        r = w - 1;
      }
    }
    mx = max(mx, x + n - i + 1);
  }
  cout << mx << endl;
}
