#include <bits/stdc++.h>
using namespace std;
const int mx = (int)5e5 + 5;
int sum[mx], sumr[mx], ans = 0, T, a, n;
int dist(int r) { return sum[r] + (r - 1) * a; }
void solve() {
  int L = 0, R = n + 1, mid = (R + L) >> 1;
  while (mid > L) {
    if (mid > R || mid < L) break;
    int now = dist(mid);
    if (now <= T) {
      L = mid;
      mid = R;
    } else
      R = mid;
    mid = (L + R) >> 1;
  }
  ans = max(ans, L);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int b;
  cin >> n >> a >> b >> T;
  T = T++;
  sum[0] = sumr[0] = 0;
  for (__typeof(n) i = (1); i <= n; ++i) {
    char c;
    cin >> c;
    if (c == 'w' && i == 1) T--;
    sum[i] = sum[i - 1] + ((c == 'w') ? b + 1 : 1);
  }
  for (__typeof(n) i = (1); i <= n; ++i)
    sumr[i] = sumr[i - 1] + sum[n - i + 1] - sum[n - i];
  solve();
  for (__typeof(n) i = (1); i <= n; ++i) sum[i] = sumr[i];
  solve();
  cout << ans << endl;
  return 0;
}
