#include <bits/stdc++.h>
using namespace std;
long long rsum[500005];
long long lsum[500005];
long long bsearch(long long l, long long r, long long time, long long a[]) {
  if (time <= 0) return 0;
  long long mid;
  while (l <= r) {
    mid = (l + r) / 2;
    if (a[mid] <= time) {
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  return l - 1;
}
int main() {
  std::ios::sync_with_stdio(false);
  long long n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  for (long long i = 1; i <= n; i++) {
    if (i == 1) {
      if (s[i - 1] == 'w') {
        rsum[i] = b + 1;
      } else
        rsum[i] = 1;
    } else {
      if (s[i - 1] == 'w') {
        rsum[i] = a + b + 1;
      } else
        rsum[i] = a + 1;
    }
  }
  for (long long i = 2; i <= n; i++) rsum[i] += rsum[i - 1];
  for (long long i = n; i >= 1; i--) {
    if (i == n) {
      if (s[i - 1] == 'w')
        lsum[n - i + 1] = b + 1;
      else
        lsum[n - i + 1] = 1;
    } else {
      if (s[i - 1] == 'w')
        lsum[n - i + 1] = a + b + 1;
      else
        lsum[n - i + 1] = a + 1;
    }
  }
  for (long long i = 2; i <= n; i++) {
    lsum[i] += lsum[i - 1];
  }
  long long cnt = 0;
  for (long long i = 1; i <= n; i++) {
    if (lsum[i] <= t) {
      long long x = bsearch(1, n - i, t - lsum[i] - i * a - a, rsum);
      if (x >= 1) cnt = max(cnt, i + x);
    }
  }
  for (long long i = 1; i <= n; i++) {
    if (rsum[i] <= t) {
      cnt = max(cnt, i + bsearch(1, n - i, t - rsum[i] - i * a, lsum));
    }
  }
  cout << cnt << endl;
  return 0;
}
