#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 500000 + 10;
char s[MAX_N];
int n, a, b, T, tot, le[MAX_N], ri[MAX_N];
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    tot += b * (s[i] == 'w') + 1;
    if (i == n) break;
    tot += a;
  }
  if (tot <= T) {
    printf("%d\n", n);
    return 0;
  }
  if (b * (s[0] == 'w') + 1 > T) {
    printf("0\n");
    return 0;
  }
  for (int i = 1; i < n; i++) {
    ri[i] = ri[i - 1] + a + b * (s[i] == 'w') + 1;
  }
  for (int i = 1; i < n; i++) le[i] = le[i - 1] + a + b * (s[n - i] == 'w') + 1;
  int ans = 1;
  for (int i = 0; i < n; i++) {
    int cur = b * (s[0] == 'w') + le[i] + 1 + a * i;
    int l = 0, r = n - i - 1 + 1;
    while (l + 1 < r) {
      int m = l + r >> 1;
      if (ri[m] + cur <= T)
        l = m;
      else
        r = m;
    }
    if (ri[l] + cur <= T) ans = max(ans, i + l + 1);
    cur = b * (s[0] == 'w') + ri[i] + 1 + a * i;
    l = 0, r = n - i - 1 + 1;
    while (l + 1 < r) {
      int m = l + r >> 1;
      if (le[m] + cur <= T)
        l = m;
      else
        r = m;
    }
    if (le[l] + cur <= T) ans = max(ans, i + l + 1);
  }
  printf("%d\n", ans);
  return 0;
}
