#include <bits/stdc++.h>
const int32_t MAX_N = 5e5 + 505;
char hor[MAX_N];
int32_t photoCnt;
int32_t forw[MAX_N];
int32_t back[MAX_N];
int32_t rotCost, swipeCost;
int32_t maxTime;
void input() {
  scanf("%i %i %i %i", &photoCnt, &swipeCost, &rotCost, &maxTime);
  scanf("%s", hor);
  for (int32_t i = 0; i < photoCnt; i++) {
    hor[i] = hor[i] == 'w';
  }
}
void calc_dp() {
  forw[0] = hor[0] * rotCost + 1;
  for (int32_t i = 1; i < photoCnt; i++) {
    forw[i] = forw[i - 1] + (swipeCost + 1) + (hor[i] * rotCost);
  }
  back[0] = 0;
  for (int32_t i = 1; i < photoCnt; i++) {
    back[i] = back[i - 1] + (swipeCost + 1) + (hor[photoCnt - i] * rotCost);
  }
}
int32_t calc_answ() {
  int32_t best = 0;
  if (maxTime < forw[0]) {
    return 0;
  }
  for (int32_t i = 0; i < photoCnt; i++) {
    int32_t forT = forw[i];
    if (forT > maxTime) {
      break;
    }
    int32_t low = 0;
    int32_t high = photoCnt - i;
    while (high - low > 1) {
      int32_t med = (high + low) >> 1;
      int32_t curT = forT + back[med];
      curT += std::min(med, i) * swipeCost;
      if (curT <= maxTime) {
        low = med;
      } else {
        high = med;
      }
    }
    best = std::max(best, low + i + 1);
  }
  return best;
}
int main() {
  input();
  calc_dp();
  printf("%i\n", calc_answ());
}
