#include <bits/stdc++.h>
using namespace std;
const int M = 500005;
char p[M];
int n, A, B, t;
long long pre[M], suf[M];
int dist(int x, int y) { return abs(x - y); }
int binary(long long cost, int idx) {
  int l = idx, r = n, m, it = 30;
  while (it--) {
    m = (l + r) / 2;
    if (cost + suf[m] < t) {
      r = m;
    } else {
      l = m;
    }
  }
  return max(0, n - m - 1);
}
int main() {
  scanf("%d %d %d %d\n", &n, &A, &B, &t);
  gets(p);
  for (int i = 0; i < n; i++) {
    if (!i) {
      pre[i] = B * (p[i] == 'w') + 1;
    } else {
      pre[i] = pre[i - 1] + A + B * (p[i] == 'w') + 1;
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    if (i == n - 1) {
      suf[i] = B * (p[i] == 'w') + 1;
    } else {
      suf[i] = suf[i + 1] + A + B * (p[i] == 'w') + 1;
    }
  }
  long long cost = 0;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    cost = pre[i];
    if (cost + i + 1 <= t) {
      ans = max(ans, i + 1 + binary(cost + i + 1, i));
    }
    if (cost <= t) {
      ans = max(ans, i + 1);
    }
  }
  cout << min(ans, n);
  return 0;
}
