#include <bits/stdc++.h>
using namespace std;
const int maxn = 500000 + 10;
int cnt1[maxn], cnt2[maxn];
string pic;
int n, a, b, T;
void preprocess() {
  memset(cnt1, 0, sizeof cnt1);
  memset(cnt2, 0, sizeof cnt2);
  if (pic[0] == 'w')
    cnt1[0] = cnt2[0] = b + 1;
  else
    cnt1[0] = cnt2[0] = 1;
  for (int i = 1; i < n; i++) {
    cnt1[i] = cnt1[i - 1] + a + (pic[i] == 'w' ? b : 0) + 1;
    cnt2[i] = cnt2[i - 1] + a + (pic[n - i] == 'w' ? b : 0) + 1;
  }
}
void solve() {
  int ret = 0;
  for (int i = 0; i < n && cnt1[i] <= T; i++) {
    int t = T - cnt1[i] - i * a + cnt1[0];
    int d = upper_bound(cnt2, cnt2 + n, t) - cnt2;
    ret = max(ret, max(i + 1, d + i));
  }
  for (int i = 0; i < n && cnt2[i] <= T; i++) {
    int t = T - cnt2[i] - i * a + cnt1[0];
    int d = upper_bound(cnt1, cnt1 + n, t) - cnt1;
    ret = max(ret, max(i + 1, d + i));
  }
  cout << min(ret, n) << endl;
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  cin >> pic;
  preprocess();
  solve();
  return 0;
}
