#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 10;
const long long INF = (long long)1e18 + 10;
int n, a, b, t;
char s[N];
int cnt[N];
void initcnt() {
  for (int i = 1; i <= n; ++i) {
    cnt[i] = cnt[i - 1] + (s[i] == 'w');
  }
}
long long calcmin(int x) {
  long long res = INF;
  for (int i = 0; i < x; ++i) {
    long long t1 = 1 + (cnt[1] - cnt[0]) * b + i + 2ll * i * a +
                   1ll * (cnt[n] - cnt[n - i]) * b + (x - 1 - i) +
                   1ll * (x - 1 - i) * a + 1ll * (cnt[x - i] - cnt[1]) * b;
    long long t2 = 1 + (cnt[1] - cnt[0]) * b + i + 1ll * i * a +
                   1ll * (cnt[n] - cnt[n - i]) * b + (x - 1 - i) +
                   2ll * (x - 1 - i) * a + 1ll * (cnt[x - i] - cnt[1]) * b;
    res = min(res, min(t1, t2));
  }
  return res;
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &t);
  scanf("%s", s + 1);
  initcnt();
  int l = 0, r = n;
  if (calcmin(r) <= t) {
    printf("%d\n", n);
    return 0;
  }
  while (l + 1 < r) {
    int mid = (l + r) >> 1;
    if (calcmin(mid) <= t) {
      l = mid;
    } else {
      r = mid;
    }
  }
  printf("%d\n", l);
  return 0;
}
