#include <bits/stdc++.h>
using namespace std;
long long n, b, a, T;
string s;
const int maxN = 500000 + 100;
long long sum[maxN];
long long get(long long l, long long r) { return sum[r] - sum[l - 1]; }
bool f(long long len) {
  if (len == 0) return true;
  for (int x = 0; x <= len - 1; ++x) {
    int y = len - 1 - x;
    long long s1, s2;
    if (x == 0)
      s1 = 0;
    else
      s1 = get(n - x + 1, n);
    s2 = get(1, 1 + y);
    long long curVal = (s1 + s2) * b + (x + y + 1) + a * (x + y + min(x, y));
    if (curVal <= T) return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> a >> b >> T;
  getline(cin, s);
  getline(cin, s);
  sum[0] = 0;
  for (int i = 0; i < s.size(); ++i) sum[i + 1] = sum[i] + (s[i] == 'w');
  long long L = 0, R = n;
  while (R - L > 1) {
    long long mid = (L + R) / 2;
    if (f(mid))
      L = mid;
    else
      R = mid;
  }
  if (f(R))
    cout << R << endl;
  else
    cout << L << endl;
  return 0;
}
