#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int n, a, b, T, ans;
char s[maxn];
int pre1[maxn], pre2[maxn];
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", s + 1);
  if (s[1] == 'w')
    pre1[1] = pre2[1] = (b + 1);
  else
    pre1[1] = pre2[1] = 1;
  if (pre1[1] > T) {
    printf("0\n");
    return 0;
  }
  ans = 1;
  for (register int i = 2; i <= n; ++i) {
    pre1[i] = pre1[i - 1] + a;
    if (s[i] == 'w') pre1[i] += b;
    pre1[i]++;
    if (pre1[i] > T) break;
    ans = max(ans, i);
  }
  pre2[n + 1] = pre2[1];
  for (register int i = n; i > 1; --i) {
    pre2[i] = pre2[i + 1] + a;
    if (s[i] == 'w') pre2[i] += b;
    pre2[i]++;
    if (pre2[i] > T) break;
    ans = max(ans, n - i + 2);
  }
  printf("%d\n", ans);
  return 0;
}
