#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int mod = 1e9 + 7;
const int inf = 1061109567;
const int direct[][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
int pre[500005], suf[500005], b, a;
int val(char c) {
  if (c == 'w') return b + 1 + a;
  return 1 + a;
}
int main() {
  int n, t;
  char ch;
  string s, str;
  cin >> n >> a >> b >> t;
  cin >> ch;
  if (ch == 'w') t -= b;
  t--;
  if (t < 0) {
    puts("0");
    return 0;
  }
  int maxx = 0;
  cin >> s;
  for (int i = 0; i <= s.size(); i++) {
    if (i == 0)
      pre[i] = 0;
    else
      pre[i] = pre[i - 1] + val(s[i - 1]);
  }
  reverse(s.begin(), s.end());
  for (int i = 0; i <= s.size(); i++) {
    if (i == 0)
      suf[i] = 0;
    else
      suf[i] = suf[i - 1] + val(s[i - 1]);
  }
  for (int i = 0; i <= s.size(); i++) {
    int l = 0, r = s.size() - i, tmp = -1;
    if (pre[i] > t) break;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (pre[i] + suf[mid] + (i)*a <= t) {
        tmp = mid;
        l = mid + 1;
      } else {
        r = mid - 1;
      }
    }
    if (tmp == -1) maxx = max(maxx, i);
    maxx = max(maxx, i + tmp);
  }
  for (int i = 0; i <= s.size(); i++) {
    int l = 0, r = s.size() - i, tmp = -1;
    if (suf[i] > t) break;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (pre[mid] + suf[i] + (i)*a <= t) {
        tmp = mid;
        l = mid + 1;
      } else {
        r = mid - 1;
      }
    }
    if (tmp == -1) maxx = max(maxx, i);
    maxx = max(maxx, i + tmp);
  }
  cout << maxx + 1 << endl;
  return 0;
}
