#include <bits/stdc++.h>
using namespace std;
const int N = 500010;
char s[N], ss[N];
long long n, a, b, T, f[N], g[N];
int ans;
inline long long read() {
  long long w(0), f(0);
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') f = 1, c = getchar();
  while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar();
  return f ? -w : w;
}
int pre(int x) { return x - 1 == 0 ? n : x - 1; }
int next(int x) { return x + 1 > n ? 1 : x + 1; }
inline void Init() {
  n = read(), a = read(), b = read(), T = read();
  scanf("%s", s + 1);
  T--;
  if (s[1] == 'w') T -= b;
  if (T < 0) return;
  ans = 1;
  for (int i = 2; i <= n; ++i) ss[i] = s[n - i + 2];
  ss[1] = s[1];
  for (int i = 2; i <= n; ++i) {
    f[i] = f[i - 1] + a + 1;
    if (s[i] == 'w') f[i] += b;
    if (f[i] <= T) ans = i;
  }
  for (int i = 2; i <= n; ++i) {
    g[i] = g[i - 1] + a + 1;
    if (ss[i] == 'w') g[i] += b;
    if (g[i] <= T) ans = max(ans, i);
  }
}
inline void work() {
  if (ans == n || T < 0) return;
  int cnt = n - 1;
  for (int i = 2; i <= n; ++i) {
    while (f[i] + g[cnt] + min(cnt - 1, i - 1) * a > T && cnt >= 1) cnt--;
    if (cnt == 1) break;
    ans = max(ans, i + cnt - 1);
  }
}
inline void Print() { cout << ans << endl; }
int main() {
  Init();
  work();
  Print();
  return 0;
}
