#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 100;
;
int dpr[MAXN], dpl[MAXN], c[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int a, b, n, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) c[i] = (s[i] == 'w' ? 1 : 0);
  dpl[1] = dpr[1] = 1 + (c[0] == 1 ? b : 0);
  dpl[n] = dpl[1] + a + 1 + (c[n - 1] == 1 ? b : 0);
  for (int i = n - 1; i > 1; i--)
    dpl[i] = dpl[i + 1] + a + 1 + (c[i - 1] == 1 ? b : 0);
  for (int i = 2; i < n + 1; i++)
    dpr[i] = dpr[i - 1] + a + 1 + (c[i - 1] == 1 ? b : 0);
  int l = 1, r = n;
  if (dpr[1] > t) return cout << 0, 0;
  for (int i = 1; i < n + 1; i++) {
    if (dpr[i] <= t)
      l = i;
    else
      break;
  }
  if (l == n) return cout << n, 0;
  int ans = 0;
  cerr << dpl[5] << endl;
  for (int i = l; i > 0; i--) {
    while (dpr[i] + (i - 1) * a + dpl[r] - dpl[1] <= t or
           dpl[r] + (n - r + 1) * a + dpr[i] - dpr[1] <= t)
      r--;
    ans = max(ans, i + n - r);
  }
  for (int i = n; i > 1; i--)
    if (dpl[i] <= t) ans = max(ans, n - i + 1);
  cout << ans << endl;
  return 0;
}
