#include <bits/stdc++.h>
using namespace std;
long long int v[500005], pre[500005] = {0}, post[500005] = {0};
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, a, b, t, val, l, r, diff;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == 'w')
      v[i] = b;
    else
      v[i] = 0;
  }
  pre[0] = v[0] + 1;
  for (long long int i = 1; i < n; i++) {
    pre[i] = v[i] + 1 + pre[i - 1];
  }
  post[n] = 0;
  post[n - 1] = v[n - 1] + 1;
  for (long long int i = (n - 2); i >= 0; i--) post[i] = v[i] + 1 + post[i + 1];
  long long int ans = 0;
  for (long long int i = 1; i <= n; i++) {
    val = a * (i - 1) * 2 + pre[i - 1];
    diff = t - val;
    if (diff < 0) continue;
    l = i, r = n;
    while (l < r) {
      long long int mid = (l + r) / 2;
      if (a * (n - mid) + post[mid] <= diff)
        r = mid;
      else
        l = mid + 1;
    }
    ans = max(ans, n - l + i);
    val = a * (i - 1) + pre[i - 1];
    diff = t - val;
    if (diff < 0) continue;
    l = i, r = n;
    while (l < r) {
      long long int mid = (l + r) / 2;
      if (a * (n - mid) * 2 + post[mid] <= diff)
        r = mid;
      else
        l = mid + 1;
    }
    ans = max(ans, n - l + i);
  }
  cout << ans << endl;
}
