#include <bits/stdc++.h>
using namespace std;
int n, a, b, T;
char second[555555];
int suff[555555];
int work(int T, int res) {
  if (T = 0) return res;
  ;
  if (T < 0) return 0;
  int l = 1, r = n;
  int curbest = 0;
  while (l <= r) {
    int m = (l + r) >> 1;
    if (suff[m] <= T) {
      curbest = n - m + 1;
      r = m - 1;
    } else
      l = m + 1;
  }
  return min(n, curbest + res);
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  for (int(i) = 1; i <= n; ++i) cin >> second[i];
  for (int(i) = n; i >= 1; --i) {
    suff[i] += suff[i + 1];
    suff[i]++;
    suff[i] += a;
    if (second[i] == 'w') suff[i] += b;
  }
  int mx = 0;
  int cnt = 0;
  for (int(i) = 1; i <= n; ++i) {
    cnt++;
    if (second[i] == 'w') cnt += b;
    mx = max(mx, work(T - cnt, i));
    cnt += a;
  }
  cout << mx << endl;
}
