#include <bits/stdc++.h>
using namespace std;
int N, S, T, W;
char D[500005];
int R1[500005], R2[500005];
int L1[500005], L2[500005];
int main() {
  ios::ios_base::sync_with_stdio(false);
  cin >> N >> S >> W >> T;
  cin >> D;
  const int s = (D[0] == 'w' ? 1 + W : 1);
  for (int i = 1, cnt = 0; i < N; ++i) {
    cnt += S + (D[i] == 'w' ? 1 + W : 1);
    R1[i] = cnt;
    R2[i] = cnt + s + S * i;
  }
  for (int i = N - 1, cnt = 0; i >= 1; --i) {
    const int j = N - i;
    cnt += S + (D[i] == 'w' ? 1 + W : 1);
    L1[j] = cnt;
    L2[j] = cnt + s + S * j;
  }
  L2[0] = R2[0] = s;
  int ans = 0;
  for (int i = 0; i < N && L2[i] <= T; ++i) {
    int *p = upper_bound(R1, R1 + N, T - L2[i]);
    const int x = (p - R1) + i;
    if (ans < x) ans = x;
  }
  for (int i = 0; i < N && R2[i] <= T; ++i) {
    int *p = upper_bound(L1, L1 + N, T - R2[i]);
    const int x = (p - L1) + i;
    if (ans < x) ans = x;
  }
  cout << (ans >= N ? N : ans);
  return 0;
}
