#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
long long dp[N][2];
int n, a, b, t;
char str[N];
int main() {
  cin >> n >> a >> b >> t;
  cin >> str + 1;
  int ans = 0;
  if (str[1] == 'w')
    t -= b + 1;
  else
    t -= 1;
  if (t >= 0) ans++;
  for (int i = 2; i < n; i++) {
    dp[i][0] += dp[i - 1][0] + 1 + a;
    if (str[i] == 'w') dp[i][0] += b;
    if (dp[i][0] <= t) ans = max(ans, i);
  }
  for (int i = n; i >= 1; i--) {
    dp[i][1] += dp[i + 1][1] + 1 + a;
    if (str[i] == 'w') dp[i][1] += b;
  }
  for (int l = 1; l <= n; l++) {
    int L = l + 1, R = n;
    while (L <= R) {
      int M = L + R >> 1;
      if (dp[l][0] + dp[M][1] + min(l - 1, n - M + 1) * a <= t)
        R = M - 1;
      else
        L = M + 1;
    }
    if (L <= n) ans = max(ans, l + n - L + 1);
  }
  cout << ans << endl;
  return 0;
}
