#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f, MOD = 1e9 + 7, EPS = 1e-6;
const int N = 5e5 + 5;
int n, a, b, t, o[N], p[N], s[N];
char c;
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &t);
  for (int i = 1; i <= n; ++i) scanf(" %c", &c), o[i] = c == 'w';
  p[0] = s[0] = -a;
  for (int i = 1; i <= n; ++i) p[i] = p[i - 1] + a + 1 + (o[i] == 1) * b;
  for (int i = 1; i <= n; ++i)
    s[i] = s[i - 1] + a + 1 + (o[n - i + 1] == 1) * b;
  int ans = 0;
  for (int i = 1; i <= n and p[i] <= t; ++i) {
    int j = upper_bound(s + 1, s + n + 1, t - p[i] - (i - 1) * a) - s - 1;
    ans = max(ans, i + j);
  }
  for (int i = 1; i <= n and s[i] + p[1] + a <= t; ++i) {
    int j = upper_bound(p + 1, p + n + 1, t - s[i] - i * a) - p - 1;
    ans = max(ans, i + j);
  }
  printf("%d\n", min(ans, n));
  return 0;
}
