#include <bits/stdc++.h>
using namespace std;
const int SIZEN = 500100;
int N;
long long a, b, T;
char str[SIZEN] = {0};
long long sum1[SIZEN] = {0};
long long sum2[SIZEN] = {0};
long long need(int x) {
  long long ret = (N - x + 1) * (a + 1) + sum2[x] * b;
  return ret;
}
long long solve(int x) {
  long long ret = (sum1[x] - sum1[1]) * b + (x - 1) * (a + 1);
  return ret;
}
int main() {
  scanf("%d%lld%lld%lld", &N, &a, &b, &T);
  scanf("%s", str + 1);
  for (int i = 1; i <= N; i++) {
    if (str[i] == 'w') sum1[i] = sum2[i] = 1;
  }
  for (int i = 1; i <= N; i++) sum1[i] += sum1[i - 1];
  for (int i = N; i >= 1; i--) sum2[i] += sum2[i + 1];
  long long tot = 1 + sum1[1] * b;
  if (tot > T) {
    printf("0");
    return 0;
  } else {
    int ans = 1;
    for (int i = 1; i <= N; i++) {
      long long rest = T - tot;
      if (rest < 0) break;
      int l = i + 1, r = N, mid;
      while (l <= r) {
        mid = ((l + r) >> 1);
        if (need(mid) <= rest)
          r = mid - 1, ans = max(ans, i + N - mid + 1);
        else
          l = mid + 1;
      }
      tot -= sum1[i] * b;
      tot += sum1[i + 1] * b;
      tot += 1;
      tot += 2 * a;
    }
    tot = 1 + sum1[1] * b;
    for (int i = N; i >= 2; i--) {
      tot += sum2[i] * b;
      tot += 2 * a + 1;
      if (tot > T) break;
      int l = 2, r = i - 1, mid;
      long long rest = T - tot;
      while (l <= r) {
        mid = ((l + r) >> 1);
        if (solve(mid) <= rest)
          l = mid + 1, ans = max(ans, N - i + 1 + mid);
        else
          r = mid - 1;
      }
      tot -= sum2[i] * b;
    }
    tot = 1;
    for (int i = 2; i <= N; i++) {
      tot = i + (i - 1) * a + sum1[i] * b;
      if (tot <= T) ans = max(ans, i);
    }
    tot = 1 + sum1[1] * b;
    for (int i = N; i >= 2; i--) {
      tot = 1 + sum1[1] * b + (N - i + 1) * (a + 1) + sum2[i] * b;
      if (tot <= T) ans = max(ans, N - i + 2);
    }
    printf("%d\n", ans);
  }
  return 0;
}
