#include <bits/stdc++.h>
using namespace std;
struct _ {
  ios_base::Init i;
  _() {
    cin.sync_with_stdio(0);
    cin.tie(0);
  }
} _;
const int INF = 1e9 + 7;
const long long INFLL = 1e18 + 7;
const int MAXN = -1;
int n, m;
int main() {
  int a, T;
  int orient;
  cin >> n >> a >> orient >> T;
  vector<int> b(n, 0), b_sum_b(n), b_sum_bf(n), f_sum(n), b_sum(n), f_sum_b(n);
  for (int(i) = (0); (i) < (n); ++(i)) {
    char c;
    cin >> c;
    if (c == 'w') b[i] = orient;
  }
  for (int(i) = (1); (i) < (n); ++(i)) {
    f_sum_b[i] = f_sum_b[i - 1] + b[i];
    b_sum_b[i] = b_sum_b[i - 1] + b[n - i];
    f_sum[i] = f_sum_b[i] + i * a + i;
    b_sum[i] = b_sum_b[i] + i * a + i;
    b_sum_bf[i] = b_sum[i] + i * a;
  };
  if (b[0] + 1 > T) {
    cout << 0 << endl;
    return 0;
  }
  int n_max_f = 0;
  int s = 0;
  while (n_max_f < n - 1) {
    if (b[0] + 1 + f_sum[n_max_f + 1] <= T)
      n_max_f++;
    else
      break;
  };
  ;
  ;
  ;
  int res = n_max_f + 1;
  for (int i = n_max_f; i >= 0; --i) {
    int forw_1 = f_sum[i];
    int forw_2 = i * a;
    ;
    vector<int>::iterator up = upper_bound((b_sum).begin(), (b_sum).end(),
                                           T - forw_1 - forw_2 - b[0] - 1);
    int n_b = up - b_sum.begin() - 1;
    n_b = max(0, n_b);
    ;
    ;
    res = max(min(n, n_b + i + 1), res);
    up = upper_bound((b_sum_bf).begin(), (b_sum_bf).end(),
                     T - forw_1 - b[0] - 1);
    ;
    n_b = up - b_sum_bf.begin() - 1;
    n_b = max(0, n_b);
    ;
    res = max(min(n, n_b + i + 1), res);
    ;
    ;
  }
  cout << res << endl;
  return 0;
}
