#include <bits/stdc++.h>
using namespace std;
bool which_do[1000000] = {};
int time_to_reach_fromlast[1000000] = {};
int time_to_reach_fromfirst[1000000] = {};
int main() {
  int n, a, b, t;
  scanf("%d%d%d%d", &n, &a, &b, &t);
  int ans = 1;
  string hoge;
  cin >> hoge;
  for (long long i = 0; i < n; ++i) {
    if (hoge[i] == 'w') {
      which_do[i] = true;
    }
  }
  if (which_do[0] == true) {
    if (1 + b > t) {
      cout << "0" << endl;
      return 0;
    } else {
      t -= 1 + b;
    }
  } else {
    if (1 > t) {
      cout << "0" << endl;
      return 0;
    } else {
      t -= 1;
    }
  }
  int hum = 0;
  int now_time_itr = 0;
  for (int i = n - 1; i > 0; --i) {
    hum += 3;
    if (which_do[i] == true) hum += b;
    time_to_reach_fromlast[i] = hum;
    if (hum >= t) {
      now_time_itr = i;
      goto iowq;
    }
  }
iowq:;
  hum = 0;
  long long first_itr = 0;
  for (int i = 1; i < n; ++i) {
    hum += 3;
    if (which_do[i] == true) hum += b;
    time_to_reach_fromfirst[i] = hum;
    if (hum >= t) {
      first_itr = i;
      goto wask;
    }
  }
wask:;
  if (first_itr == 0) {
    cout << n << endl;
    return 0;
  }
  ans = max(ans, n - now_time_itr + 1);
  for (int i = 1; i < first_itr + 1; ++i) {
    t -= 3;
    if (which_do[i] == true) t -= b;
    while (true) {
      if (t - (time_to_reach_fromlast[now_time_itr] + 2 * i) >= 0) break;
      now_time_itr++;
    }
    int q = n - now_time_itr;
    ans = max(ans, 1 + i + q);
  }
  cout << ans << endl;
}
