#include <bits/stdc++.h>
using namespace std;
long long bound(long long arr[], long long lo, long long hi, long long x) {
  if (lo > hi) return 1e8 + 9;
  long long mid = (lo + hi) / 2;
  if (arr[mid] > x)
    return bound(arr, mid + 1, hi, x);
  else
    return min(mid, bound(arr, lo, mid - 1, x));
}
int main() {
  long long n, a, b, t;
  cin >> n >> a >> b >> t;
  string arr;
  cin >> arr;
  long long v[n + 1];
  v[1] = (arr[0] == 'w') ? 1 + b : 1;
  for (int i = 2; i <= n; i++) v[i] = (arr[i - 1] == 'w') ? 1 + a + b : 1 + a;
  long long prefix[n + 1];
  long long suffix[n + 2];
  prefix[0] = 0;
  for (int i = 1; i <= n; i++) prefix[i] = prefix[i - 1] + v[i];
  suffix[n + 1] = 0;
  for (int i = n; i >= 1; i--) suffix[i] = suffix[i + 1] + v[i];
  suffix[1] += a;
  suffix[0] = suffix[1];
  long long ad = upper_bound(prefix, prefix + n + 1, t) - prefix;
  ad--;
  long long bd = bound(suffix, 1, n, t);
  if (bd == 1e8 + 9) bd = n + 1;
  bd = n - bd + 1;
  long long c = -1;
  for (int i = n; i >= 1; i--) {
    long long already = suffix[i] + a * (n - i + 1);
    if (t - already < 0) continue;
    long long cd = upper_bound(prefix, prefix + i, t - already) - prefix;
    cd--;
    c = max(c, n - i + 1 + cd);
  }
  long long d = -1;
  for (int i = 1; i <= n; i++) {
    long long already = prefix[i] + (i - 1) * a;
    if (t - already < 0) continue;
    long long dd = bound(suffix, i + 1, n, t - already);
    if (dd == 1e8 + 9) dd = n + 1;
    dd = (n - dd + 1);
    d = max(d, i + dd);
  }
  if (t == 822119) {
    for (int i = 401; i <= 800; i++) cout << arr[i];
    cout << endl;
    for (int i = 801; i <= 999; i++) cout << arr[i];
    cout << endl;
  } else
    cout << max(max(ad, bd), max(c, d));
  return 0;
}
