#include <bits/stdc++.h>
using namespace std;
const int maxn = 500010;
long long n, a, b, T;
long long num[maxn];
char str[maxn];
bool judge(long long mid) {
  for (long long i = 1; i <= mid; ++i) {
    long long t1 = num[i] + (num[n] - num[n - (mid - i)]);
    long long t2 = min((i - 1ll) * a * 2ll + (mid - i) * a,
                       (mid - i) * a * 2ll + (i - 1ll) * a);
    if (t1 + t2 <= T) return true;
  }
  return false;
}
int main() {
  scanf("%lld%lld%lld%lld%s", &n, &a, &b, &T, str + 1);
  long long left = 0, right = n, ans = 0;
  for (int i = 1; i <= n; ++i) {
    num[i] = num[i - 1] + 1;
    if (str[i] == 'w') num[i] += b;
  }
  while (left <= right) {
    long long mid = (left + right) >> 1ll;
    if (judge(mid)) {
      ans = mid;
      left = mid + 1ll;
    } else {
      right = mid - 1;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
