#include <bits/stdc++.h>
using namespace std;
int n;
long long a, b, t, suf[500007], val[500007], ans = 0, cur = 0, now = 0;
string s;
int sol(int x) {
  int l = x + 1, r = n, mid = (r + l) / 2;
  if (l > r) return 0;
  long long res = cur + (long long)x * a;
  while (l != mid && r != mid) {
    if (res + suf[mid] > t)
      l = mid + 1;
    else
      r = mid;
    mid = (l + r) / 2;
  }
  for (int i = l; i <= r; i++) {
    if (res + suf[i] <= t) return n - i + 1;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> a >> b >> t;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'w') val[i + 1] = b;
    val[i + 1]++;
  }
  for (int i = n; i >= 1; i--) {
    if (i == n)
      suf[i] = val[i];
    else
      suf[i] = suf[i + 1] + a + val[i];
  }
  if (val[1] > t) {
    cout << 0;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (i == 1)
      cur += val[i];
    else
      cur += val[i] + a;
    if (cur > t) break;
    now++;
    ans = max(ans, now + sol(i));
  }
  cout << ans;
}
