#include <bits/stdc++.h>
using namespace std;
long long const N = 5e5 + 20;
long long n, a, b, t, l[N], r[N], ans;
string s;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> a >> b >> t;
  cin >> s;
  t--;
  if (s[0] == 'w') t -= b;
  if (t < 0) return cout << 0, 0;
  for (long long i = 1; i < n; i++) {
    l[i] = l[i - 1] + a + 1;
    if (s[i] == 'w') l[i] += b;
  }
  for (long long i = n - 1; i > 0; i--) {
    r[i] = r[i + 1] + a + 1;
    if (s[i] == 'w') r[i] += b;
  }
  long long p = 0;
  for (long long i = 0; i < n; i++) {
    p = max(p, i + 1);
    while (p < n && l[i] + r[p] + min(i, n - p) * a > t) p++;
    if (l[i] + r[p] + min(i, n - p) * a <= t) ans = max(ans, i + 1 + n - p);
  }
  return cout << ans, 0;
}
