#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, u, v, T;
  scanf("%d%d%d%d", &n, &u, &v, &T);
  int i, t;
  vector<int> a;
  string s;
  cin >> s;
  int ans = 0;
  if (s[0] == 'h') {
    T--;
    ans++;
  } else {
    T -= v + 1;
    if (T >= 0) {
      ans++;
    }
  }
  int tmp = T;
  vector<int> goLeft;
  int d = n - 1;
  while (tmp > 0 && d > 0) {
    tmp -= u;
    int total = u;
    if (s[d] == 'h') {
      tmp--;
      if (tmp >= 0) {
        total++;
        ans++;
      }
    }
    if (s[d] == 'w') {
      tmp -= v + 1;
      if (tmp >= 0) {
        total += v + 1;
        ans++;
      }
    }
    if (tmp >= 0) {
      goLeft.push_back(total +
                       (goLeft.size() > 0 ? goLeft[goLeft.size() - 1] : 0));
    }
    d--;
  }
  tmp = 1;
  for (i = 1; i < n; i++) {
    T -= u;
    if (s[i] == 'h') {
      T--;
      if (T >= 0) {
        tmp++;
        ans = max(ans, tmp);
      }
    } else {
      T -= v + 1;
      if (T >= 0) {
        tmp++;
        ans = max(ans, tmp);
      }
    }
    int l, r, m;
    l = 0, r = goLeft.size() - 1;
    int tt = T - i * u;
    if (tt <= 0) {
      continue;
    }
    while (l < r) {
      m = (l + r + 1) >> 1;
      if (tt - goLeft[m] >= 0 && n - m - 1 > i) {
        l = m;
        ans = max(ans, tmp + m + 1);
      } else {
        r = m - 1;
      }
    }
  }
  printf("%d", ans);
  return 0;
}
