#include <bits/stdc++.h>
using namespace std;
char s[500005];
long long L[500005], R[500005];
int n, a, b, T, ret, now, i, ans, c;
inline void work(long long *L, long long *R) {
  for (i = 2; i <= n; i++) {
    if (R[i] > T) continue;
    long long rest = T - R[i] - 1ll * (i - 1) * a;
    int id = upper_bound(L + 2, L + n + 1, rest) - (L + 1);
    id--;
    ans = max(ans, i - 1 + id);
  }
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", s + 1);
  T -= (s[1] == 'w') * b;
  T--;
  if (T < 0) {
    puts("0");
    return 0;
  }
  for (i = 2; i <= n; i++)
    if ((R[i] = R[i - 1] + a + (s[i] == 'w') * b + 1) <= T)
      ans = max(ans, i - 1);
  for (i = 2; i <= n; i++)
    if ((L[i] = L[i - 1] + a + (s[n - i + 2] == 'w') * b + 1) <= T)
      ans = max(ans, i - 1);
  work(L, R);
  work(R, L);
  printf("%d\n", min(n, ans + 1));
}
