#include <bits/stdc++.h>
using namespace std;
char str[1111111];
bool vis[1111111];
int main() {
  int n, a, b, T;
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", str);
  int i = 0, j = 0, ans = 0;
  int t = T, cnt = 0;
  while (j < n) {
    if (str[j] == 'w') t -= b;
    --t;
    if (t < 0) break;
    ++cnt;
    t -= a;
    ++j;
  }
  if (cnt == 0) {
    putchar('0');
    return 0;
  }
  ans = max(ans, cnt);
  t = T;
  for (int k = 0; k < cnt; ++k) {
    if (str[k] == 'w') t -= b;
    --t;
    if (k != cnt - 1) t -= a;
    vis[k] = 1;
  }
  j = cnt - 1;
  while (true) {
    if (--i == -1) i = n - 1;
    if (vis[i]) break;
    t -= a;
    if (str[i] == 'w') t -= b;
    --t;
    t -= a;
    while (t < 0 && j > 0 && vis[j]) {
      t += a;
      if (str[j] == 'w') t += b;
      ++t;
      --cnt;
      vis[j] = 0;
      --j;
    }
    if (t < 0) break;
    ++cnt;
    ans = max(ans, cnt);
  }
  memset(vis, 0, sizeof(vis));
  i = 0;
  j = 0;
  t = T;
  cnt = 0;
  while (cnt < n) {
    if (str[i] == 'w') t -= b;
    --t;
    if (t < 0) break;
    ++cnt;
    t -= a;
    if (--i == -1) i = n - 1;
  }
  ans = max(ans, cnt);
  t = T;
  for (int k = 0, tmp = 0; k < cnt; ++k) {
    if (str[tmp] == 'w') t -= b;
    --t;
    if (k != cnt - 1) t -= a;
    vis[tmp] = 1;
    if (--tmp == -1) tmp = n - 1;
  }
  if (++i == n) i = 0;
  while (true) {
    if (++j == n) j = 0;
    if (vis[j]) break;
    t -= a;
    if (str[j] == 'w') t -= b;
    --t;
    t -= a;
    while (t < 0 && i && vis[i]) {
      t += a;
      if (str[i] == 'w') t += b;
      ++t;
      --cnt;
      vis[i] = 0;
      if (++i == n) i = 0;
    }
    if (t < 0) break;
    ++cnt;
    ans = max(ans, cnt);
  }
  printf("%d", ans);
  return 0;
}
