#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 5;
long long n, a, b;
char s[MAXN];
long long c[MAXN];
long long check(int len) {
  long long i;
  long long cost = 99999999999, sum = 0;
  for (i = 1; i <= len; i++) sum += c[i];
  cost = min(cost, sum + a * (len - 1));
  long long l, r = len - 1;
  for (l = n; l >= 1; l--, r--) {
    if (r == 0) break;
    sum += c[l];
    sum -= c[r + 1];
    long long cost2 = 0;
    cost2 = min(r - 1, (n - l + 1)) * a + (len - 1) * a;
    cost = min(cost, sum + cost2);
  }
  return cost;
}
int main() {
  long long m, i, j, k;
  long long t;
  scanf("%lld%lld%lld%lld", &n, &a, &b, &t);
  scanf("%s", s + 1);
  for (i = 1; i <= n; i++) {
    if (s[i] == 'w')
      c[i] = b + 1;
    else
      c[i] = 1;
  }
  long long ans = 0;
  long long l = 1, r = n, o = 200;
  while (o--) {
    long long mid = (l + r) >> 1;
    if (t >= check(mid))
      ans = max(ans, mid), l = mid + 1;
    else
      r = mid - 1;
  }
  cout << ans << endl;
}
