#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  int n;
  long long a, b, T;
  cin >> n >> a >> b >> T;
  string s;
  cin >> s;
  int big = 1, e = n, mid, ans = 0, nt, nw, f;
  long long tot;
  while (big <= e) {
    mid = (big + e) / 2;
    nt = mid;
    int l = nt;
    nw = 0;
    f = 0;
    for (int i = 1; i < l + 1; ++i)
      if (s[i - 1] == 'w') ++nw;
    for (int r = n + 1; r >= n - nt + 2; --r) {
      if (r <= n && s[r - 1] == 'w') ++nw;
      tot = nt + (nt - 1) * a + nw * b + (min(l - 1, n - r + 1)) * a;
      if (tot <= T) {
        f = 1;
        break;
      }
      if (s[l - 1] == 'w') --nw;
      --l;
    }
    if (f) {
      ans = mid;
      big = mid + 1;
    } else
      e = mid - 1;
  }
  cout << ans << '\n';
  return 0;
}
