#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 1;
int n, a, b, T;
char s[MAXN];
int pre[MAXN], suffix[MAXN];
int solve() {
  pre[0] = s[0] == 'w' ? b + 1 : 1;
  for (int i = 1; i < n; i++)
    pre[i] = pre[i - 1] + (s[i] == 'w' ? b : 0) + 1 + a;
  suffix[0] = 0;
  for (int i = n - 1; i >= 0; i--)
    suffix[n - i] = suffix[n - i - 1] + (s[i] == 'w' ? b : 0) + 1 + a;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int leftT = T - pre[i] - i * a;
    if (leftT < 0) continue;
    int right = upper_bound(suffix, suffix + n, leftT) - suffix - 1;
    right = min(right, n - i - 1);
    ans = max(ans, right + i + 1);
  }
  for (int i = 0; i < n; i++) {
    int leftT = T - suffix[i] - i * a;
    if (leftT < 0) continue;
    int leftPos = upper_bound(pre, pre + n, leftT) - pre;
    leftPos = min(leftPos, n - i);
    ans = max(ans, i + leftPos);
  }
  return ans;
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", s);
  printf("%d\n", solve());
  return 0;
}
