#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 10;
const int INF = 2e9;
const double eps = 1e-6;
const double PI = acos(-1);
int n, m, a, b, T, Ans, L, R;
int sum[MAXN];
char s[MAXN];
template <typename T>
inline bool read(T &a) {
  a = 0;
  char c = getchar();
  int f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    a = a * 10 + (c ^ 48);
    c = getchar();
  }
  return a *= f, true;
}
template <typename A, typename... B>
inline bool read(A &x, B &...y) {
  return read(x) && read(y...);
}
bool chk(int len) {
  for (int i = 1; i <= len; ++i) {
    int s1 = sum[i] + (sum[n] - sum[n - (len - i)]);
    int s2 = (len - 1) * a + min((i - 1) * a, (len - i) * a);
    if (s1 + s2 <= T) return true;
  }
  return false;
}
signed main() {
  read(n), read(a), read(b), read(T);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; ++i) sum[i] = sum[i - 1] + 1 + (s[i] == 'w' ? b : 0);
  L = 0, R = n;
  while (L < R) {
    int mid = (L + R + 1) >> 1;
    if (chk(mid))
      L = mid;
    else
      R = mid - 1;
  }
  printf("%d\n", L);
  return 0;
}
