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