#include <bits/stdc++.h>
using namespace std;
string s1;
int a, b, n;
int f[500005];
int solve(string s, int T) {
  int ans = 0;
  int i;
  for (i = 1; i <= n; i++) {
    f[i] = f[i - 1];
    if (s[i - 1] == 'w') f[i]++;
  }
  int j;
  if (s[0] == 'w') {
    if (T - b - 1 >= 0) ans++;
    T = T - b - 1;
  } else {
    if (T - 1 >= 0) ans++;
    T = T - 1;
  }
  for (i = 1; i <= n; i++) {
    int left = i + 1, right = n;
    while (left < right) {
      int mid = (left + right) / 2;
      if (T - (n - mid + i) * (a + 1) - (f[n] - f[mid - 1]) * b >= 0) {
        ans = max(ans, i + n - mid + 1);
        right = mid;
      } else {
        left = mid + 1;
      }
    }
    if (s[i] == 'w') {
      if (T - b - 1 - a >= 0) {
        ans = max(ans, i + 1);
        T = T - b - 1 - a;
      } else
        break;
    } else {
      if (T - 1 - a >= 0) {
        ans = max(ans, i + 1);
        T = T - 1 - a;
      } else
        break;
    }
  }
  return ans;
}
int main() {
  int T;
  cin >> n >> a >> b >> T;
  int i;
  cin >> s1;
  string s2;
  s2 += s1[0];
  for (i = n - 1; i >= 1; i--) s2 += s1[i];
  int ans = max(solve(s2, T), solve(s1, T));
  ans = min(ans, n);
  cout << ans << endl;
  return 0;
}
