#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int n, a, b, T;
long long s[N];
char c[N];
bool check(int x) {
  for (int i = 1; i <= x; i++) {
    long long s1 = s[i] + s[n] - s[n + i - x];
    long long s2 = min(a * (i + x - 2), a * (2 * x - i - 1));
    if (s1 + s2 <= T) return 1;
  }
  return 0;
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &T);
  scanf("%s", c + 1);
  for (int i = 1; i <= n; i++) {
    s[i] = s[i - 1] + 1;
    if (c[i] == 'w') s[i] += b;
  }
  int l = 0, r = n;
  while (l < r) {
    int mid = (l + r + 1) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid - 1;
  }
  printf("%d", l);
  return 0;
}
