#include <bits/stdc++.h>
using namespace std;
const int N = 500010;
char ss[N];
int n, a, b, T;
int t1[N], t2[N], ans;
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", ss);
  t1[0] = 1 + (ss[0] == 'w' ? b : 0);
  if (t1[0] <= T) ans = 1;
  for (int i = 1; i < n; i++) {
    t1[i] = t1[i - 1] + a + 1;
    if (ss[i] == 'w') t1[i] += b;
    if (t1[i] <= T) ans = i + 1;
  }
  reverse(ss + 1, ss + n);
  t2[0] = 1 + (ss[0] == 'w' ? b : 0);
  if (t2[0] <= T) ans = max(ans, 1);
  for (int i = 1; i < n; i++) {
    t2[i] = t2[i - 1] + a + 1;
    if (ss[i] == 'w') t2[i] += b;
    if (t2[i] <= T) ans = max(ans, i + 1);
  }
  for (int i = 0; i < n; i++) {
    int p = upper_bound(t2 + 1, t2 + n, T - t1[i] - i * a + t2[0]) - t2 - 1;
    if (t1[i] + i * a + t2[p] - t2[0] <= T) ans = max(ans, i + p + 1);
  }
  for (int i = 0; i < n; i++) {
    int p = upper_bound(t1 + 1, t1 + n, T - t2[i] - i * a + t1[0]) - t1 - 1;
    if (t2[i] + i * a + t1[p] - t1[0] <= T) ans = max(ans, i + p + 1);
  }
  ans = min(ans, n);
  cout << ans << endl;
  return 0;
}
