#include <bits/stdc++.h>
using namespace std;
int dx4[] = {-1, 0, 1, 0};
int dy4[] = {0, 1, 0, -1};
int dx8[] = {-1, -1, 0, 1, 1, 1, 0, -1};
int dy8[] = {0, 1, 1, 1, 0, -1, -1, -1};
void Duxar(int _this_line) {}
bool AreEqual(double a, double b) { return (fabs(a - b) < 1e-10); }
template <class T>
bool GetNr(T &_value) {
  T _sign = 1;
  char ch;
  _value = 0;
  while (!isdigit(ch = getchar())) {
    if (ch == -1) {
      return false;
    }
    ch == '-' ? _sign = -1 : _sign = 1;
  }
  do {
    _value = _value * 10 + (ch - '0');
  } while (isdigit(ch = getchar()));
  _value *= _sign;
  return true;
}
long long N, A, B, T, ans;
char str[500001];
int ShouldRotate(char x) { return x == 'w'; }
int main() {
  string fileInput = "sum";
  long long i, j, cleft, cright;
  GetNr(N);
  GetNr(A);
  GetNr(B);
  GetNr(T);
  scanf("%s", str);
  if (1 + ShouldRotate(str[0]) * B > T) {
    printf("0\n");
    return 0;
  }
  i = j = cleft = 0;
  cright = ShouldRotate(str[0]) * B + 1;
  for (j = 0; j + 1 < N; ++j) {
    long long aux = (long long)cright + 1 + A + ShouldRotate(str[j + 1]) * B;
    if (aux > T) {
      break;
    }
    cright = aux;
  }
  if (j == N - 1) {
    cout << N << '\n';
    return 0;
  }
  ans = j + 1;
  do {
    long long ni = i;
    do {
      if (ni == 0) {
        ni = N - 1;
      } else {
        --ni;
      }
      if (cleft + ShouldRotate(str[ni]) * B + A + 1 + cright +
              min(N - ni, j) * A <=
          T) {
        i = ni;
        cleft += ShouldRotate(str[i]) * B + A + 1;
        ans = max(ans, N - i + j + 1);
      } else {
        break;
      }
    } while (1);
    cright -= ShouldRotate(str[j]) * B + A + 1;
    --j;
  } while (0 <= j);
  printf("%d\n", (int)ans);
  return 0;
}
