#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  long long int L[n + 2], R[n + 2];
  L[0] = 1 + b * (s[0] == 'w');
  R[n - 1] = 1 + a + b * (s[n - 1] == 'w');
  if (L[0] > t) {
    printf("0");
    return 0;
  }
  for (long long int i = 1; i < n; i++) {
    L[i] = L[i - 1] + a + 1 + b * (s[i] == 'w');
  }
  for (long long int i = n - 2; i >= 0; i--) {
    R[i] = R[i + 1] + 1 + a + b * (s[i] == 'w');
  }
  reverse(R, R + n);
  long long int index = upper_bound(L, L + n, t) - L;
  long long int ans = 1;
  if (index >= 0) ans = max(ans, index);
  index = upper_bound(R, R + n, t - L[0]) - R;
  if (index >= 0) ans = max(ans, index + 1);
  for (long long int l = 0; l < n; l++) {
    if (t - L[l] - l * a > 0) {
      index = upper_bound(R, R + n, t - L[l] - l * a) - R;
      if (index >= 0) {
        ans = max(ans, index + l + 1);
      }
    }
  }
  for (long long int r = 0; r < n; r++) {
    if (t - (r + 1) * a - L[0] - R[r] > 0) {
      index = upper_bound(L, L + n, t - (r + 1) * a - L[0] - R[r]) - L;
      if (index >= 0) ans = max(ans, index);
    }
  }
  cout << min(ans, n) << endl;
  return 0;
}
