#include <bits/stdc++.h>
using namespace std;
int n;
int ans;
int a, b, t;
int x, y;
int A[500005], B[500005], C[500005];
char s[500005];
int tap(int x) {
  int h = 1, t = n, m;
  int ret = 0;
  while (h <= t) {
    m = (h + t) / 2;
    if (B[m] <= x) {
      ret = max(ret, m);
      h = m + 1;
    } else
      t = m - 1;
  }
  return ret;
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &t);
  scanf("%s", s);
  int T = t;
  for (int i = 1; i <= n; i++) {
    C[i] = C[i - 1];
    if (s[i - 1] == 'w') C[i] += b;
    A[i] = C[i] + i + (i - 1) * a * 2;
  }
  memset(C, 0, sizeof(C));
  for (int i = n; i > 1; i--) {
    C[i] = C[i + 1];
    if (s[i - 1] == 'w') C[i] += b;
    B[n - i + 1] = (n - i + 1) + C[i] + (n - i + 1) * a;
  }
  for (int i = 1; i <= n; i++) {
    if (A[i] > t) break;
    int k = tap(t - A[i]);
    ans = max(ans, min(tap(t - A[i]) + i, n));
  }
  memset(C, 0, sizeof(C));
  for (int i = 2; i <= n; i++) {
    C[i] = C[i - 1];
    if (s[i - 1] == 'w') C[i] += b;
    B[i - 1] = C[i] + (i - 1) + (i - 1) * a;
  }
  memset(C, 0, sizeof(C));
  if (s[0] == 'w') C[n + 1] += b;
  A[1] = C[n + 1] + 1;
  for (int i = n; i > 1; i--) {
    C[i] = C[i + 1];
    if (s[i - 1] == 'w') C[i] += b;
    A[n - i + 2] = (n - i + 2) + C[i] + (n - i + 1) * a * 2;
  }
  for (int i = 1; i <= n; i++) {
    if (A[i] > t) break;
    int k = tap(t - A[i]);
    ans = max(ans, min(tap(t - A[i]) + i, n));
  }
  memset(C, 0, sizeof(C));
  for (int i = 1; i <= n; i++) {
    C[i] = C[i - 1];
    if (s[i - 1] == 'w') C[i] += b;
    if (C[i] + i + (i - 1) * a <= t) ans = max(ans, i);
  }
  memset(C, 0, sizeof(C));
  if (s[0] == 'w') C[n + 1] = b;
  for (int i = n; i > 1; i--) {
    C[i] = C[i + 1];
    if (s[i - 1] == 'w') C[i] += b;
    if (C[i] + (n - i + 2) + (n - i + 1) * a <= t) ans = max(ans, n - i + 2);
  }
  cout << ans;
}
