#include <bits/stdc++.h>
using namespace std;
int n, a, b, T;
char s[600000];
int sf[600000];
int pf[600000];
int get_best_t(int k) {
  if (k == 0) {
    return 0;
  }
  int ans = 1234567890;
  for (int(i) = (0); (i) < (int)(k); ++(i)) {
    int go_r = pf[i + 1] + i * a;
    int go_l = sf[i + 1] + i * a;
    int rest = k - i - 1;
    if (rest) {
      go_r += (i + rest) * a + sf[rest + 1] - sf[1];
      go_l += (i + rest) * a + pf[rest + 1] - pf[1];
    }
    ans = min(ans, min(go_r, go_l));
  }
  return ans;
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", s);
  int l = 0, r = n + 1;
  sf[1] = 1 + (s[0] == 'w') * b;
  for (int(i) = (1); (i) < (int)(n); ++(i)) {
    sf[i + 1] = sf[i] + 1 + (s[n - i] == 'w') * b;
  }
  for (int(i) = (1); (i) < (int)(n + 1); ++(i)) {
    pf[i] = pf[i - 1] + 1 + (s[i - 1] == 'w') * b;
  }
  while (l + 1 < r) {
    int m = (l + r) >> 1;
    if (get_best_t(m) > T) {
      r = m;
    } else {
      l = m;
    }
  }
  printf("%d\n", l);
  return 0;
}
