#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, a, b, T, ans;
char s[500005];
long long c[500005], d[500005];
int find(long long x, int r) {
  if (!r) return 0;
  int l = 0, ret;
  while (r >= l) {
    int mid = (l + r) >> 1;
    if (d[mid] <= x)
      ret = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  return ret;
}
int rfind(long long x, int r) {
  if (!r) return 0;
  int l = 2, ret = 0;
  while (r >= l) {
    int mid = (l + r) >> 1;
    if (c[mid] <= x)
      ret = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  return ret;
}
int main() {
  n = read(), a = read(), b = read(), T = read();
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) {
    int t = a + 1;
    if (i == 1) t -= a;
    if (s[i] == 'w') t += b;
    c[i] = c[i - 1] + t;
  }
  for (int i = n; i >= 2; i--) {
    int t = a + 1;
    if (s[i] == 'w') t += b;
    d[n - i + 1] = d[n - i] + t;
  }
  for (int i = 1; i <= n; i++) {
    long long len = i - 1;
    long long rem = T - a * len - c[i];
    if (rem < 0) break;
    int ret = i;
    ret += find(rem, n - i);
    ans = max(ans, ret);
  }
  for (int i = 1; i <= n - 1; i++) {
    long long len = i;
    long long rem = T - a * len - d[i];
    if (rem < 0) break;
    int ret = i;
    ret += rfind(rem, n - i);
    if (ret > ans) ans = ret + 1;
  }
  printf("%d\n", ans);
}
