#include <bits/stdc++.h>
using namespace std;
long long fastpow(long long x, long long y) {
  if (!y) return 1;
  if (y % 2) return (x * fastpow(x, y - 1));
  return fastpow((x * x), y / 2);
}
vector<int> v;
int bs(int s, int e, int targ) {
  int mid, ans = 0;
  while (s <= e) {
    mid = (s + e) / 2;
    if (v[mid] <= targ) {
      ans = mid;
      s = mid + 1;
    } else
      e = mid - 1;
  }
  return ans;
}
int main() {
  int n, a, b, t, c[500005], r1[100002] = {}, r2[100005] = {};
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    c[i] = ((s[i] == 'w') * b) + 1;
  }
  r1[0] = ((s[0] == 'w') * b) + 1;
  for (int i = 1; i < n; i++) {
    r1[i] = r1[i - 1] + c[i] + a;
  }
  r2[n - 1] = ((s[n - 1] == 'w') * b) + 1;
  for (int i = n - 2; i >= 0; i--) {
    r2[i] = r2[i + 1] + c[i] + a;
  }
  for (int i = 0; i < n; i++) v.push_back(r2[i]);
  sort(v.begin(), v.end());
  int mx = 0, cnt = r1[0];
  for (int i = 0; i < n; i++) {
    int cnt = r1[i];
    if (cnt <= t) {
      if ((cnt + ((i + 1) * a)) <= t) {
        int ans = bs(0, v.size(), t - (cnt + ((i + 1) * a)));
        if (ans + i + 2 <= n)
          mx = max(mx, ans + i + 2);
        else
          return cout << n, 0;
      }
    }
  }
  cout << mx;
}
