#include <bits/stdc++.h>
using namespace std;
long long int n, k, m, h1, h2, x, y, t;
string s;
int ql[1000000], qr[1000000];
int tme(int ind) {
  int v = 0;
  if (s[ind] == 'w') v += k;
  v++;
  return v;
}
int f(int lefttime, int cnt) { return qr[cnt] <= lefttime; }
int f2(int lefttime, int cnt) { return ql[cnt] <= lefttime; }
int main() {
  cin >> n >> m >> k >> t >> s;
  int ans = 0;
  ql[0] = 0;
  for (int i = 1; i < n; i++) {
    ql[i] = ql[i - 1] + tme(i) + m;
    if (ql[i] + tme(0) <= t) ans = max(ans, i + 1);
  }
  qr[0] = 0;
  for (int i = 1; i < n; i++) {
    qr[i] = qr[i - 1] + tme(n - i) + m;
    if (qr[i] + tme(0) <= t) ans = max(ans, i + 1);
  }
  for (int i = 0; i < n; i++) {
    int v = ql[i] + tme(0) + i * m;
    if (v > t) continue;
    int lefttime = t - v;
    int l = 0, r = n - 1, qm;
    while (l + 1 < r) {
      qm = l + (r - l) / 2;
      if (f(lefttime, qm) == 1) {
        l = qm;
      } else {
        r = qm;
      }
    }
    if (f(lefttime, r) == 1)
      ans = max(ans, i + r + 1);
    else
      ans = max(ans, i + l + 1);
  }
  for (int i = 0; i < n; i++) {
    int v = qr[i] + tme(0) + i * m;
    if (v > t) continue;
    int lefttime = t - v;
    int l = 0, r = n - 1, qm;
    while (l + 1 < r) {
      qm = l + (r - l) / 2;
      if (f2(lefttime, qm) == 1) {
        l = qm;
      } else {
        r = qm;
      }
    }
    if (f2(lefttime, r) == 1)
      ans = max(ans, i + r + 1);
    else
      ans = max(ans, i + l + 1);
  }
  cout << min(ans, (int)n);
}
