#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t n, a, b, T;
  cin >> n >> a >> b >> T;
  vector<bool> photos(n, false);
  for (int i = 0; i < n; i++) {
    char c;
    cin >> c;
    if (c == 'w') photos[i] = true;
  }
  vector<int64_t> left(n, 0), right(n, 0);
  for (int i = 1; i < n; i++) {
    right[i] = right[i - 1] + a + 1;
    if (photos[i]) {
      right[i] += b;
    }
  }
  for (int i = 1; i < n; i++) {
    left[i] = left[i - 1] + a + 1;
    if (photos[n - i]) {
      left[i] += b;
    }
  }
  int64_t result = 0, temp = 0;
  int64_t time_left = 0, time_right = 0;
  int ll = n - 1, rr = n - 1;
  T--;
  if (photos[0]) {
    T -= b;
    if (T < 0) {
      cout << 0 << endl;
      return 0;
    } else if (T == 0) {
      cout << 1 << endl;
      return 0;
    }
  }
  for (int i = 1; i < n; i++) {
    if (right[i] > T) {
      if (i > result) {
        result = i;
      }
      rr = i;
      break;
    }
  }
  for (int i = 1; i < n; i++) {
    if (left[i] > T) {
      if (i > result) {
        result = i;
      }
      ll = i;
      break;
    }
  }
  time_left = T;
  for (int i = 1; i < n && time_left >= 0 && ll >= 0; i++) {
    time_left -= 2 * a + 1;
    if (photos[i]) {
      time_left -= b;
    }
    while (left[ll] > time_left) {
      ll--;
      if (ll < 0) break;
    }
    result = max(result, (int64_t)(ll + i + 1));
  }
  time_left = T;
  for (int i = 1; i < n && time_left >= 0 && rr >= 0; i++) {
    time_left -= 2 * a + 1;
    if (photos[n - i]) {
      time_left -= b;
    }
    while (right[rr] > time_left) {
      rr--;
      if (rr < 0) break;
    }
    temp = result;
    result = max(result, (int64_t)(rr + i + 1));
  }
  if (min(left[n - 1], right[n - 1]) <= T) result = n;
  cout << min(result, n) << endl;
  return 0;
}
