#include <bits/stdc++.h>
using namespace std;
long long pref[511111];
long long suff[511111];
long long solve(long long n, long long t, long long a) {
  long long ans = 1;
  for (int i = 1; i < n; i++) {
    if (suff[i] <= t) {
      long long count = n - i + 1;
      ans = max(ans, count);
      long long time = t - suff[i] - (count - 1) * a;
      auto it = lower_bound(pref, pref + n, time);
      int index = it - pref;
      if (pref[index] == time) {
        ans = max(ans, count + index);
      } else {
        ans = max(ans, count + index - 1);
      }
    }
  }
  return ans;
}
int main() {
  long long n, a, b;
  long long t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  t--;
  if (s[0] == 'w') t -= b;
  if (t < 0) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = 1; i < n; i++) {
    pref[i] = pref[i - 1] + a + 1;
    if (s[i] == 'w') pref[i] += b;
  }
  suff[n - 1] = 1 + a;
  if (s[n - 1] == 'w') suff[n - 1] += b;
  for (int i = n - 2; i > 0; i--) {
    suff[i] = suff[i + 1] + a + 1;
    if (s[i] == 'w') suff[i] += b;
  }
  long long ans = 1;
  for (int i = 1; i < n; i++) {
    if (pref[i] <= t) ans = i + 1;
  }
  if (ans == n) {
    cout << n << endl;
    return 0;
  }
  ans = solve(n, t, a);
  for (int i = 1; i < n; i++) {
    swap(pref[i], suff[n - i]);
  }
  ans = max(ans, solve(n, t, a));
  cout << ans << endl;
}
