#include <bits/stdc++.h>
using namespace std;
const int maxn = 100;
int n, a, b, t, ans;
string s;
int tl[maxn], tr[maxn];
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &t);
  cin >> s;
  tr[0] = 1;
  if (s[0] == 'w') tr[0] += b;
  tl[0] = tr[0];
  for (int i = 1; i < n; ++i) {
    tr[i] = tr[i - 1] + a + 1;
    if (s[i] == 'w') tr[i] += b;
    tl[n - i] = tl[(n - i + 1) % n] + a + 1;
    if (s[n - i] == 'w') tl[n - i] += b;
  }
  for (int i = 1; i < n; ++i) {
    if (t < tl[n - i]) continue;
    int k = lower_bound(tr, tr + n, t - tl[n - i]) - tr - 1;
    if (k < 0) k = 0;
    ans = max(ans, min(n, i + k));
  }
  if (t >= tr[0]) ans++;
  if (tr[n - 1] <= t) ans = n;
  if (tl[1] <= t) ans = n;
  printf("%d\n", ans);
  return 0;
}
