#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int n, a, b, T, sumwat, sumskp, lb, ub, mid;
int prerwat[500010], prerskp[500010], prelwat[500010], prelskp[500010];
string ph;
bool checkr(int lft) { return prerwat[mid] - prerwat[0] <= lft; }
bool checkl(int lft) {
  return prelwat[mid == 0 ? 0 : n - mid] - prelwat[0] <= lft;
}
void binary_search_to_right(int coo, int lft) {
  lb = 0;
  ub = n - coo - 1;
  while (lb <= ub) {
    mid = (lb + ub) / 2;
    if (checkr(lft))
      lb = mid + 1;
    else
      ub = mid - 1;
  }
}
void binary_search_to_left(int coo, int lft) {
  lb = 0;
  ub = n - coo - 1;
  while (lb <= ub) {
    mid = (lb + ub) / 2;
    if (checkl(lft))
      lb = mid + 1;
    else
      ub = mid - 1;
  }
}
int main() {
  cin >> n >> a >> b >> T >> ph;
  sumwat = -a;
  sumskp = -a;
  for (int i = 0; i < n; i++) {
    sumwat += a + 1 + (ph[i] == 'w' ? b : 0);
    prerwat[i] = sumwat;
    sumskp += a;
    prerskp[i] = sumskp;
  }
  sumwat = 1 + (ph[0] == 'w' ? b : 0);
  sumskp = 0;
  prelwat[0] = sumwat;
  prelskp[0] = sumskp;
  for (int i = n - 1; i > 0; i--) {
    sumwat += a + 1 + (ph[i] == 'w' ? b : 0);
    prelwat[i] = sumwat;
    sumskp += a;
    prelskp[i] = sumskp;
  }
  int ans = -1;
  for (int i = 0; i < n; i++) {
    int coo = (i == 0 ? 0 : n - i), cost = prelwat[coo];
    cost += prelskp[coo];
    if (cost > T) break;
    binary_search_to_right(i, T - cost);
    ans = max(ans, i + 1 + ub);
  }
  for (int i = 0; i < n; i++) {
    int cost = prerwat[i];
    cost += prerskp[i];
    if (cost > T) break;
    binary_search_to_left(i, T - cost);
    ans = max(ans, i + 1 + ub);
  }
  ans = max(0, ans);
  printf("%d\n", ans);
  return 0;
}
