#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 10;
int sum1[N], sum2[N], n, a, b, t;
char s[N];
int solve(int *suml, int *sumr) {
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    int qwq = t - suml[i] - (i - 1) * a;
    if (qwq < 0) break;
    qwq += (s[1] == 'w') * b + 1;
    int pos = upper_bound(sum2 + 1, sum2 + n + 1, qwq) - sum2 - 1;
    ans = max(ans, min(n, i + pos - 1));
  }
  return ans;
}
int main() {
  scanf("%d%d%d%d%s", &n, &a, &b, &t, s + 1);
  sum1[1] = sum2[1] = 1 + (s[1] == 'w') * b;
  for (int i = 2; i <= n; i++) {
    sum1[i] = sum1[i - 1] + a + (s[i] == 'w') * b + 1;
    sum2[i] = sum2[i - 1] + a + (s[n - i + 2] == 'w') * b + 1;
  }
  int ans = max(solve(sum1, sum2), solve(sum2, sum1));
  printf("%d", ans);
  return 0;
}
