#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int n, a, b, T;
char s[N];
int x[N], y[N];
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", s + 1);
  for (int i = 2; i <= n; ++i) x[i] = x[i - 1] + a + 1 + b * (s[i] == 'w');
  for (int i = n; i >= 2; --i) y[i] = y[i + 1] + a + 1 + b * (s[i] == 'w');
  T -= 1 + b * (s[1] == 'w');
  int ans = 0;
  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 - j + 1);
  }
  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 - j + 1);
  }
  ans = min(ans, n);
  printf("%d\n", ans);
  return 0;
}
