#include <bits/stdc++.h>
using namespace std;
stack<pair<int, int> > st;
char input[500002];
char input2[500002];
int main() {
  ifstream in("a.in");
  ofstream out("a.out");
  int n, a, b, tmax;
  cin >> n >> a >> b >> tmax;
  cin >> input;
  int t = 1 + (input[0] == 'w') * b;
  int i = 1;
  int sol = 0;
  if (t <= tmax) sol = 1;
  while (t < tmax && i <= n) {
    if (i > sol) sol = i;
    st.push(make_pair(tmax - t, i - 1));
    t += a + (input[i] == 'w') * b + 1;
    i++;
  }
  if (t <= tmax && i == n + 1) sol = n;
  t = 0;
  if (!st.empty())
    while (st.top().first - a * st.top().second < 0) {
      st.pop();
      if (st.empty()) break;
    }
  t = a + 1 + (input[n - 1] == 'w') * b;
  int k = 1;
  i = n;
  while (t < tmax && i > 1) {
    if (st.empty()) break;
    while (st.top().first - a * st.top().second - t < 0) {
      if (st.top().second + k > sol) sol = st.top().second + k;
      st.pop();
      if (st.empty()) break;
    }
    t += a + (input[i - 2] == 'w') * b + 1;
    i--;
    k++;
  }
  if (!st.empty())
    while (st.top().first - a * st.top().second - t < 0) {
      if (st.top().second + k > sol) sol = st.top().second + k;
      st.pop();
      if (st.empty()) break;
    }
  if (sol > n) sol = n;
  while (!st.empty()) st.pop();
  input2[0] = input[0];
  for (int i = 1; i < n; i++) input2[i] = input[n - i];
  t = 1 + (input2[0] == 'w') * b;
  i = 1;
  while (t < tmax && i <= n) {
    if (i > sol) sol = i;
    st.push(make_pair(tmax - t, i - 1));
    t += a + (input2[i] == 'w') * b + 1;
    i++;
  }
  if (t <= tmax && i == n + 1) sol = n;
  t = 0;
  if (!st.empty())
    while (st.top().first - a * st.top().second < 0) {
      st.pop();
      if (st.empty()) break;
    }
  t = a + 1 + (input2[n - 1] == 'w') * b;
  k = 1;
  i = n;
  while (t < tmax && i > 1) {
    if (st.empty()) break;
    while (st.top().first - a * st.top().second - t < 0) {
      if (st.top().second + k > sol) sol = st.top().second + k;
      st.pop();
      if (st.empty()) break;
    }
    t += a + (input2[i - 2] == 'w') * b + 1;
    i--;
    k++;
  }
  if (!st.empty())
    while (st.top().first - a * st.top().second - t < 0) {
      if (st.top().second + k > sol) sol = st.top().second + k;
      st.pop();
      if (st.empty()) break;
    }
  if (sol > n) sol = n;
  cout << sol << '\n';
  return 0;
}
