#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int(n), (a), (b);
  cin >> n >> a >> b;
  int(T);
  cin >> T;
  string s;
  cin >> s;
  int Prefix[500001], Suffix[500001];
  Prefix[0] = (s[0] == 'w') ? (b + 1) : 1;
  int ans = 0;
  for (int i = 1; i <= n - 1; i++) {
    Prefix[i] = Prefix[i - 1] + ((s[i] == 'w') ? (b + 1) : 1);
  }
  Suffix[0] = 0;
  for (int l = 1; l <= n - 1; l++) {
    Suffix[l] = Suffix[l - 1] + ((s[n - l] == 'w') ? (b + 1) : 1);
  }
  if (Prefix[0] > T || n == 1) {
    cout << ans;
    return 0;
  }
  int val;
  int l;
  for (l = 1; l <= n - 1; l++) {
    val = (l * a) + Suffix[l] + Prefix[0];
    if (val > T) break;
  }
  l--;
  ans = max(ans, 1 + l);
  for (int i = 1; i <= n - 1; i++) {
    int c = (i * a) + Prefix[i];
    if (c <= T)
      ans = max(ans, i + 1);
    else
      break;
    c += (i * a);
    l = min(l, n - i - 1);
    while (l > 0) {
      if (c + (l * a) + Suffix[l] <= T) break;
      l--;
    }
    if (c + (l * a) + Suffix[l] <= T) {
      ans = max(ans, i + 1 + l);
    }
  }
  val = Prefix[0] + 2 * a + Suffix[1];
  if (val > T) {
    cout << ans;
    return 0;
  }
  int k;
  for (k = 1; k <= n - 2; k++) {
    val = (k * a) + Prefix[k] + 2 * a + Suffix[1];
    if (val > T) break;
  }
  k--;
  ans = max(ans, (k + 2));
  for (int l = 2; l <= n - 1; l++) {
    int c = (Prefix[0] + (l * a) + Suffix[l]);
    if (c <= T)
      ans = max(ans, l + 1);
    else
      break;
    c += (l)*a;
    c -= Prefix[0];
    k = min(k, n - l - 1);
    while (k > 0) {
      if (c + k * a + Prefix[k] <= T) break;
      k--;
    }
    if (c + k * a + Prefix[k] <= T) {
      ans = max(ans, l + k + 1);
    }
  }
  cout << ans;
  return 0;
}
