#include <bits/stdc++.h>
const long long MAXN = 600001;
long long n, a, b, t;
long long c[MAXN];
char s[MAXN];
bool check(long long &answer) {
  long long ret = t + 1;
  for (long long i = 1; i <= n; i++) {
    long long tmp = 0;
    long long rem = answer - i;
    if (rem >= 0) {
      tmp = c[i] + 2ll * (i - 1) * a;
      tmp += c[n] - c[n - rem] + 1ll * rem * a;
      ret = std::min(tmp, ret);
    }
  }
  for (long long i = n + 1; i >= 1; i--) {
    long long tmp = 0;
    long long rem = n - ((n - i + 1) + 1);
    if (rem >= 0) {
      tmp = c[n] - c[i] + 2ll * (n - i + 1) * a + c[1];
      tmp += c[rem + 1] - c[1] + 1ll * rem * a;
      ret = std::min(ret, tmp);
    }
  }
  return ret <= t;
}
int main() {
  scanf("%I64d%I64d%I64d%I64d", &n, &a, &b, &t);
  scanf("%s", s + 1);
  for (long long i = 1; i <= n; i++) {
    if (s[i] == 'w') {
      c[i] = c[i - 1] + b + 1;
    } else {
      c[i] = c[i - 1] + 1;
    }
  }
  c[n + 1] = c[n];
  c[0] = c[1];
  long long left = 0, right = n;
  while (left < right) {
    long long middle = (left + right >> 1) + 1;
    if (check(middle))
      left = middle;
    else
      right = middle - 1;
  }
  std::cout << left << std::endl;
  return 0;
}
