#include <bits/stdc++.h>
long long int min(int a, int b) { return a < b ? a : b; }
using namespace std;
int main() {
  int n, a, b, t;
  scanf("%d %d %d %d", &n, &a, &b, &t);
  int pos[500000];
  getchar();
  for (int i = 0; i < n; ++i) {
    pos[i] = (getchar() == 'w' ? b : 0);
  }
  int cur = 1 + pos[0];
  if (cur > t) {
    printf("0\n");
    return 0;
  }
  int l, r;
  t -= cur;
  int left[500000];
  left[0] = 0;
  for (l = 1; l < n; ++l) {
    left[l] = a + 1 + left[l - 1] + pos[n - l];
    if (left[l] > t) {
      l--;
      break;
    }
  }
  int right[500000];
  right[0] = 0;
  for (r = 1; r < n; ++r) {
    right[r] = a + 1 + right[r - 1] + pos[r];
    if (right[r] > t) {
      r--;
      break;
    }
  }
  if (l == n) {
    printf("%d\n", n);
    return 0;
  }
  int max = r + 1;
  while (r > 0 && (right[r] + left[l] + min(l, r) * a) > t) r--;
  for (;;) {
    if (r + l + 1 > max) max = r + l + 1;
    r++;
    while (l > 0 && (right[r] + left[l] + min(l, r) * a) > t) l--;
    if (l == 0) break;
  }
  printf("%d\n", max);
}
