#include <bits/stdc++.h>
using namespace std;
long long fastpow(long long a, long long p) {
  long long result = 1ll;
  long long temp = a;
  while (p) {
    if (p & 1ll) {
      result = result * temp;
    }
    temp = temp * temp;
    p >>= 1ll;
  }
  return result;
}
long long c[600002], d[600002];
string second;
long long n;
long long a, b, t;
long long ans;
int solve(long long c[]) {
  long long sum[600002];
  long long ans = 0;
  for (int i = n - 1; i >= 0; i--) {
    sum[i] = sum[i + 1] + c[i];
  }
  long long l = 1ll, r = n;
  while (l <= r) {
    long long m = (l + r) / 2;
    long long temp1 = 0ll, temp2;
    bool ok = false;
    for (long long i = 0ll; i < m; i++) {
      temp1 += c[i];
      temp2 = sum[n - m + i + 1];
      if (temp1 + temp2 + (m - 1ll) * a + m + i * a <= t) {
        ok = true;
      }
    }
    if (ok) {
      ans = m;
      l = m + 1ll;
    } else {
      r = m - 1ll;
    }
  }
  return ans;
}
int main() {
  cin >> n >> a >> b >> t;
  cin >> second;
  for (int i = 0; i < n; i++) {
    c[i] = (second[i] == 'w' ? b : 0);
  }
  for (int i = 1; i < n; i++) {
    d[i] = c[n - i];
  }
  d[0] = c[0];
  cout << max(solve(c), solve(d)) << endl;
  return 0;
}
