#include <bits/stdc++.h>
using namespace std;
int n, t1, t2, m, cnt;
char s[1000];
int main() {
  scanf("%d%d%d%d", &n, &t1, &t2, &m);
  scanf("%s", s + 1);
  int ans = 0;
  cnt = -t1 - 1;
  for (int i = 1; i <= n; i++) {
    cnt += t1 + 1;
    if (s[i] == 'w') cnt += t2;
    if (cnt <= m) ans = max(ans, i);
    for (int j = i + 1; j <= n; j++) {
      int tmp = 0;
      for (int k = 1; k <= i; k++) {
        tmp += t1;
        if (s[k] == 'w') tmp += t2;
      }
      for (int k = n; k >= j; k--) {
        tmp += t1;
        if (s[k] == 'w') tmp += t2;
      }
      tmp -= t1;
      tmp += i - 1 + n - j + 1 + min(i - 1, n - j + 1);
      if (tmp <= m) ans = max(ans, i + n - j + 1);
    }
  }
  printf("%d\n", ans);
  return 0;
}
