#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int MN = 5e5 + 10;
const int ME = 100000 + 10;
const int mod = 1000000007;
const double pi = acos(-1.0);
const int Intmax = (~(1 << 31));
const int Intmin = (1 << 31);
const long long LLmax = (~(1LL << 63));
const long long LLmin = (1LL << 63);
const unsigned long long ULLmax = (~(0ULL));
char s[MN];
int lup[MN];
int rup[MN];
int main() {
  int n, a, b, t;
  scanf("%d%d%d%d", &n, &a, &b, &t);
  scanf("%s", s + 1);
  if (s[1] == 'w') t -= b;
  t--;
  if (t < 0) {
    printf("0\n");
    exit(0);
  }
  int i, j;
  int ans = 0;
  for (i = 2; i <= n; i++) {
    lup[i - 1] = lup[i - 2] + (s[i] == 'w' ? b : 0) + 1 + a;
  }
  for (i = n; i >= 2; i--) {
    rup[n - i + 1] = rup[n - i] + (s[i] == 'w' ? b : 0) + 1 + a;
  }
  for (i = 1; i <= n - 1; i++) {
    if (t < lup[i]) break;
    int p = t - lup[i];
    int l = 0, r = n - 1 - i;
    int pos = 0;
    while (l < r) {
      int mid = (l + r + 1) >> 1;
      if (rup[mid] + (i)*a <= p) {
        l = mid;
        pos = mid;
      } else {
        r = mid - 1;
      }
    }
    ans = max(ans, i + pos);
  }
  for (i = 1; i <= n - 1; i++) {
    if (t < rup[i]) break;
    int p = t - rup[i];
    int l = 0, r = n - 1 - i;
    int pos = 0;
    while (l < r) {
      int mid = (l + r + 1) >> 1;
      if (lup[mid] + (i)*a <= p) {
        l = mid;
        pos = mid;
      } else {
        r = mid - 1;
      }
    }
    ans = max(ans, i + pos);
  }
  printf("%d\n", ans + 1);
  return 0;
}
