#include <bits/stdc++.h>
using namespace std;
long long L[1000005];
long long R[1000005];
int main() {
  int n, a, b, t;
  char c[1000005];
  scanf("%d %d", &n, &a);
  scanf("%d %d", &b, &t);
  scanf("%s", c);
  L[0] = R[0] = 1 + (c[0] == 'w' ? b : 0);
  R[n] = 0;
  for (int i = 1; i < n; ++i) L[i] = (L[i - 1] + 1 + (c[i] == 'w' ? b : 0)) + a;
  for (int i = n - 1; i >= 1; --i)
    R[i] = (R[i + 1] + 1 + (c[i] == 'w' ? b : 0)) + a;
  if (L[n - 1] <= t) {
    printf("%d\n", n);
    return 0;
  }
  if (L[0] > t) {
    puts("0");
    return 0;
  }
  int i = -1, j = n + 1;
  while (L[i + 1] <= t) i++;
  while (L[0] + R[j - 1] <= t) j--;
  if (i == -1 && j == n + 1) {
    puts("0");
    return 0;
  }
  if (i == -1) {
    printf("%d\n", n - j + 1);
    return 0;
  }
  if (j == n + 1) {
    printf("%d\n", i + 1);
    return 0;
  }
  int ans = 0;
  int tmp = j;
  j = n;
  ans = max(i + 1, n - j + 1);
  while (i > 0) {
    while (L[i] + R[j - 1] + i * a <= t) j--;
    ans = max(ans, i + n - j + 1);
    i--;
  }
  j = tmp;
  i = 0;
  while (j < n) {
    while (L[i + 1] + R[j] + (n - j) * a <= t) i++;
    ans = max(ans, i + n - j + 1);
    j++;
  }
  cout << ans << endl;
  return 0;
}
