#include <bits/stdc++.h>
struct seg_tree {
  int base = 1 << 19, tree[1 << 20];
  void update(int place, int value) {
    for (place += base - 1; place; place >>= 1) tree[place] += value;
  }
  int rangeSum(int s, int e) {
    int ans = 0;
    for (s += base - 1, e += base - 1; s <= e; s >>= 1, e >>= 1) {
      if (s & 1) ans += tree[s++];
      if (!(e & 1)) ans += tree[e--];
    }
    return ans;
  }
} segment;
int n, a, b, t;
char ar[500005];
int main() {
  scanf("%d %d %d %d\n", &n, &a, &b, &t);
  scanf("%s", ar);
  for (int i = 0; i < n; i++) {
    if (ar[i] == 'w') segment.update(i + 1, b);
  }
  long long int st = 0, ed = n;
  while (st < ed) {
    long long int mid = (st + ed + 1) / 2;
    long long int basic = mid + (mid - 1) * a;
    bool able = false;
    for (int i = 1; i <= mid; i++) {
      long long int bee = 0;
      if (i != mid) {
        bee = segment.rangeSum(1, i) + segment.rangeSum(n - mid + i + 1, n) +
              a * (mid - i < i - 1 ? mid - i : i - 1);
      } else {
        bee = segment.rangeSum(1, mid);
      }
      if (bee + basic <= t) {
        able = true;
        break;
      }
    }
    if (able) {
      st = mid;
    } else {
      ed = mid - 1;
    }
  }
  printf("%I64d", st);
  return 0;
}
