#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:268435456")
using namespace std;
template <typename T>
T sqr(const T &x) {
  return x * x;
}
template <typename T>
T my_abs(const T &x) {
  return x < 0 ? -x : x;
}
const int INF = (int)1e9;
const long long LINF = (long long)6e18;
const long long INF64 = LINF;
const long long INFLL = LINF;
const long double EPS = 1e-8;
const long double PI = 3.1415926535897932384626433832795;
const long double ME = 1e-5;
const long long MOD = (int)1e9 + 7;
const long long MOD2 = (int)1e9 + 21;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
const int SQN = 400;
const int LOGN = 20;
const int N = (int)5e5 + 10;
const int M = (int)1e5 + 10;
char s[N];
char sl[N];
long long r[N];
long long r2[N];
long long l[N];
long long l2[N];
void solve() {
  int n, a, b, t;
  scanf("%d %d %d %d\n", &n, &a, &b, &t);
  scanf("%s", s);
  int ans = 0;
  long long ct = 0;
  int cur = 0;
  sl[0] = s[0];
  for (int i = 1; i < int(n); ++i) {
    sl[i] = s[n - i];
  }
  while (cur < n) {
    ct++;
    if (s[cur] == 'w') {
      ct += b;
    }
    r[cur] = ct;
    if (ct <= t) {
      ans = max(ans, cur + 1);
    }
    ct += a;
    cur++;
  }
  ct = 0;
  cur = 1;
  while (cur < n) {
    ct++;
    if (s[cur] == 'w') {
      ct += b;
    }
    r2[cur] = ct;
    ct += a;
    cur++;
  }
  ct = 0;
  cur = 0;
  while (cur < n) {
    ct++;
    if (sl[cur] == 'w') {
      ct += b;
    }
    l2[cur] = ct;
    if (ct <= t) {
      ans = max(ans, cur + 1);
    }
    ct += a;
    cur++;
  }
  ct = 0;
  cur = 1;
  while (cur < n) {
    ct++;
    if (sl[cur] == 'w') {
      ct += b;
    }
    l[cur] = ct;
    ct += a;
    cur++;
  }
  for (int i = 1; i < int(n); ++i) {
    int rans = i + 1;
    long long ct = r[i] + (long long)rans * (long long)a;
    long long ost = t - ct;
    if (ost >= 0) {
      int pos = upper_bound(l + 1, l + n, ost) - l - 1;
      if (pos > 0) {
        ans = max(ans, min(n, rans + pos));
      }
    }
  }
  for (int i = 1; i < int(n); ++i) {
    int lans = i + 1;
    long long ct = l2[i] + (long long)lans * (long long)a;
    long long ost = t - ct;
    if (ost >= 0) {
      int pos = upper_bound(r2 + 1, r2 + n, ost) - r2 - 1;
      if (pos > 0) {
        ans = max(ans, min(n, lans + pos));
      }
    }
  }
  cout << ans << endl;
}
int main() {
  srand((unsigned int)time(NULL));
  cout << setprecision(10) << fixed;
  solve();
  return 0;
}
