#include <bits/stdc++.h>
using namespace std;
long long mint(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
int main() {
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  vector<long long> p;
  p.resize(n);
  string s;
  cin >> s;
  for (int i = 0; i < n; i++)
    if (s[i] == 'w')
      p[i] = b;
    else
      p[i] = 0;
  if (p[0] >= t) {
    cout << 0 << endl;
    return 0;
  }
  vector<long long> f1, f2;
  f1.resize(n + 1);
  f2.resize(n + 1);
  f1[0] = p[0] + 1;
  f2[n] = 0;
  for (int i = 1; i < n; i++) f1[i] = f1[i - 1] + a + p[i] + 1;
  for (int i = n - 1; i > 0; i--) f2[i] = f2[i + 1] + a + p[i] + 1;
  long long ans = 0, max = n;
  for (int i = 0; i < n; i++) {
    if (f1[i] > t) break;
    long long tleft = t - f1[i];
    long long l, r, mid;
    l = i + 1;
    r = n - 1;
    while (l <= r) {
      mid = (l + r) / 2;
      if (f2[mid] + mint(i, n - mid) * a <= tleft) {
        r = mid - 1;
        max = mid;
      } else
        l = mid + 1;
    }
    if (n - max + i + 1 > ans) ans = n - max + i;
  }
  cout << ans << endl;
  return 0;
}
