#include <bits/stdc++.h>
using namespace std;
static const int N = 500005;
long long l[N];
long long d[N];
char s[N];
int main() {
  int a, b, t, n;
  cin >> n >> a >> b >> t;
  scanf("%s", &s);
  l[0] = 1 + b * (s[0] == 'w');
  for (int i = 1; i < n; i++) l[i] = 1 + l[i - 1] + a + b * (s[i] == 'w');
  for (int i = n - 1; i >= 0; i--) d[i] = 1 + d[i + 1] + a + b * (s[i] == 'w');
  int j = 1;
  int m = 0;
  for (int i = 0; i < n; i++) {
    while (j < n && l[i] + d[j] + i * a > t) j++;
    if ((j < n || l[i] <= t) && i + 1 + n - j > m) m = i + 1 + n - j;
  }
  int m1 = m;
  int i = 1;
  j = n - 1;
  while (i < j) {
    swap(s[i], s[j]);
    i++;
    j--;
  }
  l[0] = 1 + b * (s[0] == 'w');
  for (int i = 1; i < n; i++) l[i] = 1 + l[i - 1] + a + b * (s[i] == 'w');
  for (int i = n - 1; i >= 0; i--) d[i] = 1 + d[i + 1] + a + b * (s[i] == 'w');
  j = 1;
  m = 0;
  for (int i = 0; i < n; i++) {
    while (j < n && l[i] + d[j] + i * a > t) j++;
    if ((j < n || l[i] <= t) && i + 1 + n - j > m) m = i + 1 + n - j;
  }
  m = max(m, m1);
  cout << min(m, n) << endl;
  return 0;
}
