#include <bits/stdc++.h>
using namespace std;
char s[500005];
int ft[500005];
int bt[500005];
int main() {
  int n, a, b, T;
  scanf("%d %d %d %d", &n, &a, &b, &T);
  scanf("%s", s);
  ft[0] = 1;
  if (s[0] == 'w') {
    ft[0] += b;
  }
  for (int i = 1; i < n; i++) {
    ft[i] = ft[i - 1] + a + 1;
    if (s[i] == 'w') ft[i] += b;
  }
  bt[0] = 1;
  if (s[0] == 'w') bt[0] += b;
  for (int i = n - 1, j = 1; i >= 1; i--, j++) {
    bt[j] = bt[j - 1] + a + 1;
    if (s[i] == 'w') bt[j] += b;
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (ft[i] <= T) {
      ans = max(ans, i + 1);
    }
    if (bt[i] <= T) {
      ans = max(ans, i + 1);
    }
  }
  for (int i = 0; i <= n; i++) {
    int t = 0;
    if (i == 0)
      t = 0;
    else
      t = ft[i - 1];
    if (i > 0) t += (i - 1) * a;
    int rem = T - t;
    if (i > 0) rem += bt[0];
    if (rem <= 0) continue;
    int idx = lower_bound(bt, bt + n, rem) - (bt);
    if (bt[idx] > rem) idx--;
    if (idx < 0) continue;
    if (bt[idx] - bt[0] + t <= T) ans = max(ans, idx + i);
  }
  for (int i = 0; i <= n; i++) {
    int t = 0;
    if (i == 0)
      t = 0;
    else
      t = bt[i - 1];
    if (i > 0) t += (i - 1) * a;
    int rem = T - t;
    if (i > 0) rem += bt[0];
    if (rem <= 0) continue;
    int idx = lower_bound(ft, ft + n, rem) - (ft);
    if (ft[idx] > rem) idx--;
    if (idx < 0) continue;
    if (ft[idx] - ft[0] + t <= T) ans = max(ans, idx + i);
  }
  if (ans > n) ans = n;
  printf("%d\n", ans);
  return 0;
}
