#include <bits/stdc++.h>
using namespace std;
const int N = 500010;
long long sum[N];
char s[N];
int main() {
  int n, move, rotate, t;
  scanf("%d %d %d %d", &n, &move, &rotate, &t);
  scanf("%s", s);
  sum[0] = 0;
  for (int i = 0; i < n; ++i) {
    sum[i + 1] = sum[i] + rotate * (s[i] == 'w');
  }
  int ans = 0;
  for (int i = n; i >= 1; --i) {
    long long cur =
        1 + (n - i + 1) + sum[n] - sum[i - 1] + (long long)move * (n - i);
    if (cur > t) {
      break;
    }
    ans = n - i + 1;
  }
  for (int i = 1; i <= n; ++i) {
    long long cur = i + sum[i] + (long long)move * (i - 1);
    if (cur > t) {
      break;
    }
    int l = i, r = n + 1;
    while (r - l > 1) {
      int ss = (l + r) / 2;
      long long v =
          n - ss + 1 + (sum[n] - sum[ss - 1]) + (long long)move * (n - ss);
      long long u = (long long)move * min(i, n - ss + 2);
      if (cur + v + u <= t) {
        r = ss;
      } else {
        l = ss;
      }
    }
    ans = max(ans, i + n + 1 - r);
  }
  printf("%d\n", ans);
  return 0;
}
