#include <bits/stdc++.h>
using namespace std;
int N, A, B, T;
char R[500010];
int rig[500010];
int lef[500010];
long long tim(int l, int r, int num_ws) {
  return num_ws * (long long)B + (l + r) + min(l, r - 1) * 2 * (long long)A +
         max(l, r - 1) * (long long)A;
}
int main() {
  while (5 == scanf("%d%d%d%d%s", &N, &A, &B, &T, R)) {
    int ans = 0;
    int r = 0, num_ws = 0;
    for (; r < N; ++r) {
      num_ws += (R[r] == 'w' ? 1 : 0);
    }
    int l = 0;
    for (; r >= 1; --r) {
      while (tim(l, r, num_ws) <= T) {
        ans = max(ans, l + r);
        if (l + r >= N) break;
        num_ws += (R[N - l - 1] == 'w' ? 1 : 0);
        ++l;
      }
      num_ws -= (R[r - 1] == 'w' ? 1 : 0);
    }
    printf("%d\n", ans);
  }
}
