#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 9;
const int inf = 1e9 + 9;
int n;
long long a, b, t;
long long dp1[maxn];
long long dp2[maxn];
char num[maxn];
int deal(int len, long long time);
int main() {
  while (~scanf("%d%I64d%I64d%I64d", &n, &a, &b, &t)) {
    long long ans = 0;
    scanf("%s", num);
    if (num[0] == 'w')
      dp1[0] = 1 + b;
    else
      dp1[0] = 1;
    if (dp1[0] <= t) ans = 1;
    for (int i = 1; i < n; i++) {
      dp1[i] = dp1[i - 1] + a + 1;
      if (num[i] == 'w') dp1[i] += b;
      if (dp1[i] <= t) ans = i + 1;
    }
    if (num[n - 1] == 'w')
      dp2[0] = 1 + b;
    else
      dp2[0] = 1;
    for (int i = 1; i < n; i++) {
      dp2[i] = dp2[i - 1] + a + 1;
      if (num[n - i - 1] == 'w') dp2[i] += b;
    }
    long long tmp = 0;
    for (int i = 0; i < n; i++) {
      tmp = dp1[i];
      tmp += (long long)(i + 1) * a;
      if (tmp > t) continue;
      long long mm = deal(n - i - 1, t - tmp);
      ans = max(ans, mm + (long long)i + 1);
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
int deal(int len, long long time) {
  int low = 0, up = len - 1, mid, anss = 0;
  while (low <= up) {
    mid = low + (up - low) / 2;
    if (dp2[mid] <= time) {
      anss = max(anss, mid + 1);
      low = mid + 1;
    } else
      up = mid - 1;
  }
  return anss;
}
