#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int inf = 1e9;
const int mod = 1e9 + 7;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
int gcd(int a, int b) {
  while (b != 0) {
    int t = b;
    b = a % b;
    a = t;
  }
  return a;
}
void debug(int* a, int n) {
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << '\n';
}
void debug(vector<int> b, int n) {
  for (int i = 0; i < n; i++) cout << b[i] << " ";
  cout << '\n';
}
using namespace std;
int main() {
  long long n, a, b, t, i;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  long long pre[n + 5], suff[n + 5];
  pre[0] = 1;
  if (s[0] == 'w') {
    pre[0] += b;
  }
  for (i = 1; i < n; i++) {
    pre[i] = pre[i - 1] + a + 1;
    if (s[i] == 'w') {
      pre[i] += b;
    }
  }
  suff[n - 1] = a + 1;
  if (s[n - 1] == 'w') {
    suff[n - 1] += b;
  }
  for (i = n - 2; i >= 0; i--) {
    suff[i] = suff[i + 1] + a + 1;
    if (s[i] == 'w') suff[i] += b;
  }
  vector<long long> rs;
  for (i = 0; i < n; i++) {
    rs.push_back(suff[n - 1 - i]);
  }
  long long golu = 0;
  for (i = 0; i < n; i++) {
    long long cc = t - pre[i];
    if (cc < 0) break;
    golu = max(golu, i + 1);
    cc -= (i)*a;
    if (cc <= 0) break;
    std::vector<long long>::iterator x;
    x = lower_bound(rs.begin(), rs.end(), cc);
    long long me = x - rs.begin();
    if (rs[0] > cc) break;
    if (rs[me] == cc) me++;
    golu = max(golu, me + i + 1);
  }
  golu = min(golu, n);
  cout << golu << endl;
  return 0;
}
