#include <bits/stdc++.h>
using namespace std;
string s;
vector<int> lt;
vector<int> rt;
int main() {
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  cin >> s;
  long long t1 = 0, t2 = 0;
  rt.push_back(0);
  lt.push_back(0);
  for (int i = 1; i < s.size(); i++) {
    if (s[i] == 'w') t1 += b;
    t1 += a;
    t1++;
    rt.push_back(t1);
  }
  for (int i = s.size() - 1; i > 0; i--) {
    if (s[i] == 'w') t2 += b;
    t2 += a;
    t2++;
    lt.push_back(t2);
  }
  if (s[0] == 'w') t -= b;
  t -= 1;
  int ans = 0;
  if (t < 0) {
    cout << 0 << endl;
    return 0;
  } else {
    for (int i = 0; i < lt.size(); i++) {
      if (lt[i] > t) break;
      int tempans = 1;
      tempans += i;
      int x = t - (lt[i] + (a * i));
      tempans += lower_bound(rt.begin(), rt.end(), x) - rt.begin();
      if (rt[lower_bound(rt.begin(), rt.end(), x) - rt.begin()] > x) tempans--;
      ans = max(ans, tempans);
    }
  }
  ans = min(ans, n);
  cout << ans << endl;
}
