#include <bits/stdc++.h>
using namespace std;
int n, p[500005] = {0};
long long b[500005];
int bs(int high, long long val) {
  int low = n - 1, mid, x = n;
  while (low >= high) {
    mid = (low + high) / 2;
    if (b[mid] <= val) {
      x = mid;
      low = mid - 1;
    } else
      high = mid + 1;
  }
  return (n - x);
}
int f(int high, int val) {
  int i = n - 1, cnt = 0;
  while (i >= high) {
    if (b[i] > val) return cnt;
    cnt++;
    i--;
  }
  return cnt;
}
int main() {
  int i, j, k;
  long long x, y, t;
  char ch;
  scanf("%d %I64d %I64d %I64d ", &n, &x, &y, &t);
  for (i = 0; i <= n - 1; i++) {
    scanf("%c", &ch);
    if (ch == 'w')
      p[i] = 0;
    else
      p[i] = 1;
  }
  b[n] = 0;
  for (i = n - 1; i >= 0; i--) {
    b[i] += b[i + 1];
    b[i] += (x + 1);
    if (p[i] != 1) b[i] += y;
  }
  int mx = 0;
  long long cost = 0;
  for (i = 0; i <= n - 1; i++) {
    cost++;
    if (i > 0) cost += x;
    if (p[i] != 1) cost += y;
    if (cost > t) break;
    mx = max(mx, i + 1 + bs(i + 1, t - cost - (i * x)));
  }
  printf("%d\n", mx);
  return 0;
}
