#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
int n, a, b, T;
const int N = 5 * 100000 + 5;
char s[N];
long long A[N];
long long B[N];
int ans;
void F() {
  for (int i = 0; i < n; ++i) {
    A[i] = 0;
    if (i) A[i] = A[i - 1];
    if (i != 0) A[i] += a;
    if (s[i] == 'w') A[i] += b;
    A[i] += 1;
  }
  for (int i = n - 1; i >= 0; --i) {
    B[i] = B[i + 1];
    B[i] += a;
    if (s[i] == 'w') B[i] += b;
    B[i] += 1;
  }
  int r = n;
  for (int i = n - 1; i > 0; --i) {
    long long val = A[0] + B[i];
    if (val > T) break;
    r = i;
  }
  long long val = A[0] + B[r];
  if (val <= T) ans = max(ans, 1 + n - r);
  for (int i = 1; i < n; ++i) {
    int K;
    long long val;
    while (r <= i) ++r;
  x:
    K = 0;
    if (r != n) K = i * a;
    val = A[i] + B[r] + K;
    if (val > T && r < n) {
      ++r;
      goto x;
    }
    K = 0;
    if (r != n) K = i * a;
    val = A[i] + B[r] + K;
    if (val <= T) ans = max(ans, i + 1 + n - r);
  }
}
void solve() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", s);
  F();
  reverse(s + 1, s + n);
  F();
  cout << ans << endl;
}
long long RAND() {
  return ((long long)rand() << 32) + ((long long)rand() << 16) + rand();
}
void testgen() {
  FILE* f = fopen("input.txt", "w");
  fclose(f);
}
int main() {
  cout << fixed;
  cout.precision(10);
  cerr << fixed;
  cerr.precision(3);
  solve();
  return 0;
}
