#include <bits/stdc++.h>
using namespace std;
int n, a, b, t;
string s;
vector<int> ltr;
vector<int> rtl;
inline bool check(int tt) {
  int cnt = ltr[0];
  for (int i = 1; i <= tt; i++) {
    int x = ltr[i] + (ltr[n] - ltr[n - (tt - i)]);
    int y = min((i - 1) * a * 2 + (tt - i) * a, (i - 1) * a + (tt - i) * a * 2);
    if (x + y <= t) return 1;
  }
  return 0;
}
int main() {
  cin >> n >> a >> b >> t >> s;
  s = "~" + s;
  ltr.push_back(0);
  for (int i = 1; i <= n; i++)
    ltr.push_back(ltr[i - 1] + 1 + (s[i] == 'w' ? b : 0));
  int l = 0, r = n;
  while (l < r) {
    int mid = (l + r + 1) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid - 1;
  }
  cout << l << endl;
  return 0;
}
