#include <bits/stdc++.h>
using namespace std;
int N, a, b, T;
char s[500005];
long long head[500005], last[500005];
int main() {
  scanf("%d%d%d%d", &N, &a, &b, &T);
  scanf("%s", s + 1);
  head[1] = 0;
  for (int i = 1; i <= N; i++) {
    if (i > 1) head[i] = head[i - 1] + a;
    if (s[i] == 'w') head[i] += b;
    head[i]++;
  }
  last[N] = 0;
  for (int i = N; i >= 1; i--) {
    if (i < N) last[i] = last[i + 1] + a;
    if (s[i] == 'w') last[i] += b;
    last[i]++;
  }
  int ans = 0;
  for (int i = 1; i <= N; i++) {
    if (head[i] > T) {
      ans = i - 1;
      break;
    }
  }
  if (head[N] <= T) ans = N;
  for (int i = 1; i < N; i++) {
    int l = i + 1, r = N;
    while (l != r) {
      int mid = l + r >> 1;
      if (last[mid] + head[i] + i * a <= T)
        r = mid;
      else
        l = mid + 1;
    }
    if (last[l] + head[i] + i * a <= T) ans = max(ans, N - l + 1 + i);
    l = i + 1, r = N;
    while (l != r) {
      int mid = l + r >> 1;
      if (last[mid] + head[i] + (N - mid + 1) * a + 2 <= T)
        r = mid;
      else
        l = mid + 1;
    }
    if (last[l] + head[i] + (N - l + 1) * a + 2 <= T) {
      ans = max(ans, N - l + 1 + i);
    }
  }
  printf("%d\n", ans);
  return 0;
}
