#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
char str[N];
int arr[N], suffix[N];
int n, a, b, t;
int get1() {
  int ans = 0;
  int _t = t;
  int i = 0;
  while (i < n) {
    if (str[i] == 'w') _t -= b;
    _t--;
    if (_t >= 0)
      ans++;
    else
      break;
    if (_t >= a && i != n - 1) _t -= a, i++;
  }
  return ans;
}
int get2() {
  int ans = 0;
  int _t = t;
  int i = n - 1;
  if (str[0] == 'w') _t -= b;
  _t -= 1;
  if (t >= 0)
    ans++;
  else
    return 0;
  if (_t >= a)
    _t -= a;
  else
    return ans;
  while (i > 0) {
    if (str[i] == 'w') _t -= b;
    _t--;
    if (_t >= 0)
      ans++;
    else
      break;
    if (_t >= a && i != 1) _t -= a, i--;
  }
  return ans;
}
int main() {
  scanf("%d %d %d %d", &n, &a, &b, &t);
  scanf("%s", str);
  for (int i = 1; i <= n; i++) {
    if (str[i - 1] == 'w')
      arr[i] = b + 1;
    else
      arr[i] = 1;
  }
  for (int i = n; i >= 2; i--) {
    if (i == n)
      suffix[i] = a + arr[i];
    else
      suffix[i] = suffix[i + 1] + arr[i] + a;
  }
  if (arr[1] > t) {
    cout << 0 << endl;
    return 0;
  }
  int best = 0;
  int _t = 0;
  int back = 0;
  int lf = 0, l, r, mx;
  for (int i = 1; i <= n; i++) {
    _t += arr[i];
    if (_t > t) break;
    lf = t - _t - back;
    if (lf < suffix[n]) {
      best = max(best, i);
    } else {
      l = i + 1, r = n;
      while (l < r) {
        mx = (l + r) / 2;
        if (suffix[mx] <= lf)
          r = mx;
        else
          l = mx + 1;
      }
      best = max(best, (i + n - l + 1));
    }
    _t += a;
    back += a;
  }
  cout << best << endl;
  return 0;
}
