#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (b ? gcd(b, a % b) : a); }
long long mmc(long long a, long long b) { return a / gcd(a, b) * b; }
const int MAXN = 500005;
long long acc[MAXN];
char buff[MAXN];
int main() {
  int n, a, b, T;
  while (scanf(" %d %d %d %d", &n, &a, &b, &T) != EOF) {
    scanf(" %s", buff);
    for (int i = 0; i < n; i++) {
      acc[i] = 0LL;
      if (buff[i] == 'w') acc[i] += b;
    }
    for (int i = 1; i < n; i++) {
      acc[i] += acc[i - 1];
    }
    int res = 0;
    if (1LL * a * (n - 1) + n + acc[n - 1] <= T) {
      res = n;
    } else {
      for (int i = 2; i < n; i++) {
        long long t = n - i;
        long long tmp = (acc[n - 1] - acc[i - 1]) + (t * (a + 1) + t * a);
        if (tmp > T) continue;
        int lo = 1, hi = i - 1;
        while (lo < hi) {
          int mid = (lo + hi) >> 1;
          long long pred = (acc[mid] + mid * a + (mid + 1));
          if (tmp + pred <= T) {
            lo = mid + 1;
          } else {
            hi = mid;
          }
        }
        lo--;
        long long pred = (acc[lo] + lo * a + (lo + 1));
        tmp += pred;
        if (tmp > T) continue;
        res = max(res, (int)t + lo + 1);
      }
      for (int i = 0; i < n - 1; i++) {
        long long t = i + 1;
        long long tmp = (acc[i]) + (i * (a + 1) + i * (a)) + 1;
        if (tmp > T) continue;
        int lo = i + 2, hi = n - 1;
        while (lo < hi) {
          int mid = (lo + hi) >> 1;
          long long pred = (acc[n - 1] - acc[mid - 1]) + ((n - mid) * (a + 1));
          if (tmp + pred <= T) {
            hi = mid;
          } else {
            lo = mid + 1;
          }
        }
        long long pred = (acc[n - 1] - acc[lo - 1]) + ((n - lo) * (a + 1));
        tmp += pred;
        if (tmp > T) continue;
        res = max(res, (int)t + n - lo);
      }
      for (int i = 0; i < n; i++) {
        long long tmp = acc[i] + i * a + i + 1;
        if (tmp > T) continue;
        res = max(res, i + 1);
      }
      for (int i = 1; i < n; i++) {
        long long tmp =
            (acc[n - 1] - acc[i - 1]) + ((n - i) * (a + 1)) + 1 + acc[0];
        if (tmp > T) continue;
        res = max(res, n - i + 1);
      }
    }
    printf("%d\n", res);
  }
}
