#include <bits/stdc++.h>
using namespace std;
long long sum[500010], last[500010], n, a, b, t, ans;
char s[500010];
int main() {
  scanf("%I64d%I64d%I64d%I64d", &n, &a, &b, &t);
  scanf("%s", s + 1);
  for (long long i = 1; i <= n; i++) sum[i] += sum[i - 1] + (s[i] == 'w') * b;
  for (long long i = n; i; i--) last[i] = last[i + 1] + (s[i] == 'w') * b;
  for (long long i = 1; i <= n; i++) {
    long long now = sum[i] + i + a * (i - 1);
    if (now > t) break;
    ans = max(ans, i);
    now += a * (i - 1);
    if (now > t) continue;
    long long l = 0, r = n - i, tmp = 0;
    while (l <= r) {
      long long mid = l + r >> 1;
      if (now + last[n + 1 - mid] + mid + a * mid <= t)
        tmp = mid, l = mid + 1;
      else
        r = mid - 1;
    }
    ans = max(ans, i + tmp);
  }
  for (long long i = 2; i <= n; i++) {
    long long now = 1 + sum[1] + last[i] + (n - i + 1) * a + (n - i + 1);
    if (now > t) continue;
    ans = max(ans, n + 2 - i);
    now += a * (n + 1 - i);
    if (now > t) continue;
    long long l = 0, r = i - 2, tmp = 0;
    while (l <= r) {
      long long mid = l + r >> 1;
      if (now + sum[mid + 1] - sum[1] + a * mid + mid <= t)
        tmp = mid, l = mid + 1;
      else
        r = mid - 1;
    }
    ans = max(ans, n + 2 - i + tmp);
  }
  printf("%I64d", ans);
}
