#include <bits/stdc++.h>
using namespace std;
char cc[500005];
int ccc[500005];
int main() {
  int n, a, b, T;
  long long sum = 0;
  scanf("%d%d%d%d", &n, &a, &b, &T);
  getchar();
  scanf("%s", cc);
  sum -= a;
  for (int i = 0; i < n; i++) {
    sum += 1 + a;
    if (cc[i] == 'w') sum += b;
    ccc[i] = sum;
  }
  sum = 0;
  int cnt = 0, nn, x;
  cnt = lower_bound(ccc, ccc + n, T + 1) - ccc;
  if (cnt == 0) {
    printf("0\n");
    return 0;
  }
  nn = cnt;
  for (int i = n - 1; i > 0; i--) {
    sum += 1 + a;
    if (cc[i] == 'w') sum += b;
    x = lower_bound(ccc, ccc + nn, T - sum + 1) + n - i - ccc;
    if (x < cnt || T - sum <= 0) break;
    cnt = x;
    nn = x + 1;
    if (cnt >= n) {
      cnt = n;
      break;
    }
  }
  printf("%d\n", cnt);
}
