#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
inline bool Min(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
inline bool Max(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
inline int ni() {
  int a;
  scanf("%d", &a);
  return a;
}
inline ll nl() {
  ll a;
  scanf("%lld", &a);
  return a;
}
inline double nd() {
  double a;
  scanf("%lf", &a);
  return a;
}
inline void pi(int a) { printf("%d ", a); }
inline void pl(ll a) { printf("%lld ", a); }
inline void pd(double a) { printf("%.12lf ", a); }
const int N = 5e5 + +10;
char str[N];
void solve() {
  int n = ni();
  ll a = ni();
  ll b = ni();
  ll T = ni();
  scanf("\n%s\n", str);
  vector<ll> sum(n);
  vector<ll> pref(n);
  vector<ll> suff(n + 1);
  for (int i = 0; i < (int)(n); ++i) sum[i] = b * (str[i] == 'w') + 1;
  for (int i = 1; i < (int)(n); ++i) pref[i] = pref[i - 1] + sum[i] + a;
  for (int i = n - 1; i >= 0; i--) suff[i] = suff[i + 1] + sum[i] + a;
  int ans = 0;
  int cur = n;
  ll s0 = sum[0];
  while (cur > 0 and s0 + suff[cur - 1] <= T) cur--;
  for (int i = 0; i < n; i++) {
    if (pref[i] + s0 <= T) {
      while (cur < n and pref[i] + s0 + i * a + suff[cur] > T) cur++;
      Max(ans, (i + 1) + (n - cur));
    } else
      break;
  }
  cur = 0;
  while (cur < n - 1 and s0 + pref[cur + 1] <= T) cur++;
  for (int i = n - 1; i >= 0; i--) {
    if (suff[i] + s0 <= T) {
      while (cur > 0 and suff[i] + s0 + (n - i) * a + pref[cur] > T) cur--;
      Max(ans, cur + (n - i) + 1);
    } else
      break;
  }
  Min(ans, n);
  pi(ans);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  srand((int)clock());
  solve();
  return 0;
}
