#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
int n, m;
char ch[500005];
int a, b, T;
int x[500005], y[500005];
int main() {
  n = read(), a = read(), b = read(), T = read();
  scanf("%s", ch + 1);
  T -= 1 + b * (ch[1] == 'w');
  int ans = 0;
  for (int i = 2; i <= n; i++) x[i] = x[i - 1] + a + 1 + b * (ch[i] == 'w');
  for (int i = n; i >= 2; i--) y[i] = y[i + 1] + a + 1 + b * (ch[i] == 'w');
  for (int i = 1, j = 2; i <= n; i++) {
    while (x[i] + y[j] + (i - 1) * a > T && j <= n + 1) j++;
    if (x[i] > T) break;
    ans = max(ans, i + n + 1 - j);
  }
  for (int i = 1, j = 2; i <= n; i++) {
    while (x[i] + y[j] + (n + 1 - j) * a > T && j <= n + 1) j++;
    if (x[i] > T) break;
    ans = max(ans, i + n + 1 - j);
  }
  ans = min(ans, n);
  printf("%d\n", ans);
  return 0;
}
