#include <bits/stdc++.h>
using namespace std;
const bool ready = []() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
  return true;
}();
const double PI = acos(-1);
using ll = long long;
using pii = pair<ll, ll>;
using pdd = pair<double, double>;
using vd = vector<double>;
using vb = vector<bool>;
using vi = vector<ll>;
using vvi = vector<vi>;
using vs = vector<string>;
void solve() {
  ll n;
  cin >> n;
  ;
  ll a;
  cin >> a;
  ;
  ll b;
  cin >> b;
  ;
  ll T;
  cin >> T;
  ;
  string s;
  cin >> s;
  ;
  ll tt = T;
  if (s[0] == 'w') tt -= b;
  tt--;
  if (tt < 0) {
    cout << 0 << endl;
    return;
  }
  vi dpL;
  ll idx = 0;
  for (ll t = 0; t <= tt;) {
    idx--;
    if (idx < 0) idx = n - 1;
    if (idx == 0) {
      cout << n << endl;
      return;
    }
    t += a;
    if (s[idx] == 'w') t += b;
    t++;
    if (t <= tt) dpL.push_back(t);
  }
  vi dpR;
  idx = 0;
  for (ll t = 0; t <= tt;) {
    idx++;
    assert(idx < n);
    t += a;
    if (s[idx] == 'w') t += b;
    t++;
    if (t <= tt) dpR.push_back(t);
  }
  ll ans = max((ll)dpL.size(), (ll)dpR.size()) + 1;
  for (size_t i = 0; i < dpL.size(); i++) {
    ll et = tt - dpL[i] - (i + 1) * a;
    ll cnt = distance(dpR.begin(), upper_bound((dpR).begin(), (dpR).end(), et));
    ans = max(ans, (ll)i + 2 + cnt);
  }
  for (size_t i = 0; i < dpR.size(); i++) {
    ll et = tt - dpR[i] - (i + 1) * a;
    ll cnt = distance(dpL.begin(), upper_bound((dpL).begin(), (dpL).end(), et));
    ans = max(ans, (ll)i + 2 + cnt);
  }
  cout << ans << endl;
}
signed main() { solve(); }
