#include <bits/stdc++.h>
int n, a, b, T, i, j;
bool needb[500010];
long long int p[500010], q[500010];
int ans;
inline void make() {
  int l, r = n;
  l = 2;
  if (p[1] > T) {
    printf("0\n");
    return;
  }
  while (p[l] <= T && l <= n) l++;
  ans = l - 1;
  while (l > 1 && r > 1) {
    l--;
    while (q[r] + p[l] + (l - 1) * a <= T && r > 1) {
      r--;
    }
    if (l + n - r > ans) {
      ans = l + n - r;
    }
  }
  if (ans > n) ans = n;
  printf("%d\n", ans);
}
int main() {
  scanf("%d %d %d %d", &n, &a, &b, &T);
  char now;
  for (i = 1; i <= n; i++) {
    scanf(" %c", &now);
    needb[i] = (now == 'w');
  }
  if (needb[1]) {
    p[1] = b + 1;
  } else {
    p[1] = 1;
  }
  for (i = 2; i <= n; i++) {
    if (needb[i])
      p[i] = b + a + 1;
    else
      p[i] = a + 1;
    p[i] += p[i - 1];
  }
  for (i = n; i > 1; i--) {
    if (needb[i])
      q[i] = b + a + 1;
    else
      q[i] = a + 1;
    q[i] += q[i + 1];
  }
  make();
  return 0;
}
