#include <bits/stdc++.h>
using namespace std;
int cumulative_rght[500005], cumulative_lft[500005];
int bnrySearch(int n, int t, int val) {
  int lft = 1, rght = n;
  while ((rght - lft) >= 10) {
    int mid = (lft + rght) / 2;
    if (cumulative_rght[mid] + val <= t)
      rght = mid;
    else
      lft = mid;
  }
  for (int i = rght; i >= lft; i--)
    if (cumulative_rght[i] + val > t) return i + 1;
}
int binarySearch(int n, int t, int val) {
  int lft = 1, rght = n;
  while ((rght - lft) >= 10) {
    int mid = (lft + rght) / 2;
    if (cumulative_lft[mid] + val <= t)
      lft = mid;
    else
      rght = mid;
  }
  for (int i = lft; i <= rght; i++)
    if (cumulative_lft[i] + val > t) return i - 1;
}
char S[500005];
int main() {
  int i, j, t, n, m, k, l, r, temp, mini, maxi, flag, result = 0, cnt, a, b;
  scanf("%d", &n);
  scanf("%d%d", &a, &b);
  scanf("%d", &t);
  scanf("%s", S);
  cumulative_rght[n + 1] = cumulative_lft[0] = 0;
  for (i = n; i >= 1; i--) {
    cumulative_rght[i] = cumulative_rght[i + 1] + 1 + a;
    if (S[i - 1] == 'w') cumulative_rght[i] += b;
  }
  cumulative_lft[1] = a;
  for (i = 2; i <= n; i++) {
    cumulative_lft[i] = cumulative_lft[i - 1] + 1 + a;
    if (S[i - 1] == 'w') cumulative_lft[i] += b;
  }
  temp = 0;
  for (i = 1; i <= n; i++) {
    temp = temp + 1;
    if (S[i - 1] == 'w') temp = temp + b;
    if (temp <= t) {
      int idx = bnrySearch(n, t, temp + (i - 1) * a);
      result = max(result, i + n + 1 - idx);
    }
    temp = temp + a;
  }
  temp = 1 + a;
  if (S[0] == 'w') temp += b;
  for (i = n; i >= 1; i--) {
    temp = temp + 1;
    if (S[i - 1] == 'w') temp = temp + b;
    if (temp <= t) {
      int idx = binarySearch(n, t, temp + (n - i) * a);
      result = max(result, n - i + 1 + idx);
    }
    temp = temp + a;
  }
  printf("%d\n", min(result, n));
  return 0;
}
