#include <bits/stdc++.h>
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
long long int myRand(long long int B) { return (unsigned long long)rng() % B; }
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  long long int n;
  cin >> n;
  long long int a, b;
  cin >> a >> b;
  long long int t;
  cin >> t;
  string s;
  cin >> s;
  long long int sum = (n - 1) * a + n;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'w') sum += b;
  }
  if (sum <= t) {
    cout << n << "\n";
    return 0;
  }
  long long int cost = 1 + (s[0] == 'w' ? b : 0);
  if (cost > t) {
    cout << 0 << "\n";
    return 0;
  }
  t -= cost;
  int res = 1;
  vector<long long int> R(n, 1e15);
  cost = 0;
  R[0] = 0;
  for (int i = 1; i < n; i++) {
    cost += a + 1 + (s[i] == 'w' ? b : 0);
    R[i] = cost;
    if (cost <= t) {
      res = i + 1;
    } else {
      break;
    }
  }
  cost = 0;
  vector<long long int> RR(n, 1e15);
  RR[0] = 0;
  for (int i = n - 1; i >= 0; i--) {
    cost += a + 1 + (s[i] == 'w' ? b : 0);
    if (cost <= t) {
      RR[n - i] = cost;
      res = max(res, (int)n - i + 1);
      int l = 0, r = n;
      long long int sum = cost + (n - i) * a;
      while (r - l > 1) {
        int mid = (l + r) / 2;
        if (R[mid] + sum <= t) {
          l = mid;
        } else {
          r = mid;
        }
      }
      res = max(res, (int)n - i + 1 + l);
    } else {
      break;
    }
  }
  for (int i = 1; i < n; i++) {
    if (R[i] == 1e15) continue;
    long long int sum = R[i] + i * a;
    if (sum > t) break;
    int l = 0, r = n;
    while (r - l > 1) {
      int mid = (l + r) / 2;
      if (RR[mid] + sum <= t) {
        l = mid;
      } else {
        r = mid;
      }
    }
    res = max(res, i + 1 + l);
  }
  cout << res << "\n";
}
