#include <bits/stdc++.h>
using namespace std;
long long n, a, b, t, lef[600000], righ[600000], c[600000];
long long f(long long x) {
  if (x == 0) return 0;
  long long p = c[0] + 1;
  p += min(lef[x - 1], righ[x - 1]);
  for (long long i = 1; i < x - 1; i++)
    p = min(p,
            lef[i] + righ[x - 1 - i] + c[0] + 1 + a * (1 + min(i, x - 1 - i)));
  return p;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> a >> b >> t;
  long long l = 0, r = n;
  string s;
  long long m = 0;
  cin >> s;
  for (long long i = 0; i < n; i++)
    if (s[i] == 'w') {
      m += b;
      c[i] = b;
    }
  if (m + n + a * (n - 1) <= t) {
    cout << n << endl;
    return 0;
  }
  for (long long i = 1; i < n; i++) righ[i] = righ[i - 1] + c[i] + 1 + a;
  for (long long i = 1; i < n; i++) lef[i] = lef[i - 1] + c[n - i] + 1 + a;
  while (r - l > 5) {
    long long mid = (r + l) / 2;
    if (f(mid) <= t)
      l = mid;
    else
      r = mid - 1;
  }
  long long ans;
  for (long long i = l; i <= r; i++)
    if (f(i) <= t) ans = i;
  cout << ans << endl;
}
