#include <bits/stdc++.h>
using namespace std;
const int MaxN = 500 * 1000 + 100;
int n, a, b, T;
string s;
int dp[MaxN];
int ans;
bool check(int i, int j) {
  int c;
  if (j == n)
    c = (i + 1) + dp[i] * b + i * a;
  else if (i == j)
    c = n + dp[n - 1] * b + (n - 1) * a;
  else {
    if (i - 0 > n - 1 - j + 1)
      c = (i + 1 + n - 1 - j + 1) + (dp[i] + dp[n - 1] - dp[j - 1]) * b +
          (i + 2 * (n - j)) * a;
    else
      c = (i + 1 + n - 1 - j + 1) + (dp[i] + dp[n - 1] - dp[j - 1]) * b +
          (2 * i + (n - j)) * a;
    ;
  }
  return c <= T;
}
int search(int i, int m, int h) {
  if (m == h) {
    if (check(i, m) == true) return (i + 1 + n - m);
    return 0;
  }
  int mid = (m + h) / 2;
  if (check(i, mid) == true) return search(i, m, mid);
  return search(i, mid + 1, h);
}
int main() {
  cin >> n >> a >> b >> T;
  cin >> s;
  if (s[0] == 'w') dp[0] = 1;
  for (int i = 1; i < n; i++) {
    dp[i] = dp[i - 1];
    if (s[i] == 'w') dp[i]++;
  }
  for (int i = 0; i < n; i++) ans = max(ans, search(i, i + 1, n));
  cout << ans << endl;
  return 0;
}
