#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  ll a, b, t;
  cin >> n >> a >> b >> t;
  string orient;
  cin >> orient;
  ll initial = orient[0] == 'w' ? b : 0;
  vector<int> prefs(n), sufs(n);
  for (int i = 1; i < n; ++i) {
    prefs[i] = prefs[i - 1] + (orient[n - i] == 'w' ? b : 0);
  }
  for (int i = 1; i < n; ++i) {
    sufs[i] = sufs[i - 1] + (orient[i] == 'w' ? b : 0);
  }
  int ans = (initial + 1) <= t ? 1 : 0;
  auto check = [&](ll cost, ll total, ll small) {
    return cost + total + 1 + (total + small) * a <= t;
  };
  auto get_total = [&](int pref, int suf) {
    assert(pref + suf < n);
    ll total = initial + prefs[pref] + sufs[suf];
    return total;
  };
  for (int i = n - 1; i >= 0; --i) {
    int l = 0, r = min(i - 1, n - i - 1), best1 = -1, best2 = -1;
    while (l <= r) {
      int m = (l + r) / 2;
      ll total = get_total(i, m);
      if (check(total, i + m, m)) {
        best1 = i + m + 1;
        l = m + 1;
      } else {
        r = m - 1;
      }
    }
    l = i, r = n - i - 1;
    while (l <= r) {
      int m = (l + r) / 2;
      ll total = get_total(i, m);
      if (check(total, i + m, i)) {
        best2 = i + m + 1;
        l = m + 1;
      } else {
        r = m - 1;
      }
    }
    ans = max(ans, max(best1, best2));
  }
  cout << ans << '\n';
  return 0;
}
