#include <bits/stdc++.h>
using namespace std;
long long Lef[512345], Rig[512345];
char s[512345];
int main() {
  int n, a, b, T;
  cin >> n >> a >> b >> T;
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      Rig[i] = s[i] == 'w' ? 1 + b : 1;
    } else {
      Rig[i] = Rig[i - 1] + a + 1;
      if (s[i] == 'w') Rig[i] += b;
    }
  }
  Rig[n] = Lef[n] = 0xfffffff;
  for (int i = n - 1; i > 0; i--) {
    if (i == n - 1) {
      Lef[n - i] = s[i] == 'w' ? 1 + b : 1;
    } else {
      Lef[n - i] = Lef[n - 1 - i] + 1 + a;
      if (s[i] == 'w') Lef[n - i] += b;
    }
  }
  int mx = 0;
  for (int i = 0; i < n; i++) {
    if (Rig[i] > T) break;
    mx = max(mx, i + 1);
    int lest = T - Rig[i] - (i + 1) * a;
    if (lest < 0) continue;
    int id = upper_bound(Lef, Lef + n - i, lest) - Lef;
    mx = max(mx, id + i);
  }
  for (int i = 1; i < n; i++) {
    if (T - Lef[i] - a - Rig[0] >= 0) mx = max(mx, i + 1);
    int lest = T - Lef[i] - a - i * a;
    if (lest < Rig[0]) continue;
    int id = upper_bound(Rig, Rig + n - i, lest) - Rig;
    mx = max(mx, i + id);
  }
  mx = min(mx, n);
  cout << mx << endl;
}
