#include <bits/stdc++.h>
using namespace std;
int n, a, b;
char c[555555];
int s[555555];
int ans;
int calc(int p) { return (c[p] == 'w') ? b + 1 : 1; }
int upd(int &x, int y) { x = max(x, y); }
void solve(int T) {
  if (T < calc(0)) return;
  T -= calc(0);
  s[n] = 0;
  for (int i = n - 1; i >= 0; i--) s[i] = s[i + 1] + a + calc(i);
  int p = n - 1;
  while (p && s[p] <= T) p--;
  if (p == 0 || s[p] > T) p++;
  upd(ans, n + 1 - p);
  for (int i = 1; i < n && T >= 2 * a + calc(i); i++) {
    T -= 2 * a + calc(i);
    while (p <= i || s[p] > T) p++;
    upd(ans, n + 1 - p + i);
  }
}
int main() {
  int T;
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", c);
  ans = 0;
  solve(T);
  for (int i = 1, j = n - 1; i < j; i++, j--) swap(c[i], c[j]);
  solve(T);
  printf("%d\n", ans);
  return 0;
}
