#include <bits/stdc++.h>
using namespace std;
int n, a, b, T;
int cost[500005];
int cost2[500005];
int solve(int A[]) {
  int used = cost[0];
  int rest = T - used;
  int j = n;
  while (j - 1 > 0 && rest - cost[j - 1] - a >= 0) {
    rest -= cost[j - 1] + a, j--;
  }
  int result = 1 + (n - j);
  for (int i = 1; i < n; ++i) {
    used += cost[i] + a;
    if (used > T) {
      break;
    } else {
      result = max(result, i + 1);
    }
    rest -= cost[i] + 2 * a;
    while (j <= i || (j < n && rest < 0)) {
      rest += cost[j] + a, j++;
    }
    result = max(result, i + 1 + (n - j));
  }
  return result;
}
char tmp[500005];
int main() {
  scanf("%d%d%d%d%s", &n, &a, &b, &T, tmp);
  for (int i = 0; i < n; ++i) {
    if (tmp[i] == 'w') {
      cost[i] = 1 + b;
    } else {
      cost[i] = 1;
    }
  }
  if (cost[0] > T) {
    printf("0");
  } else {
    int ans = 1;
    memcpy(cost2, cost, sizeof(cost2));
    reverse(cost2 + 1, cost2 + n);
    ans = max(ans, solve(cost));
    ans = max(ans, solve(cost2));
    printf("%d\n", ans);
  }
}
