#include <bits/stdc++.h>
using namespace std;
int n, k;
int a, b;
char ch[500500];
int B[500500];
void preCal() {
  B[0] = 0;
  int sum = 0;
  for (int i = n - 1; i >= 0; i--) {
    sum = sum + a;
    if (ch[i] == 'w') sum = sum + b;
    sum++;
    B[n - i] = sum;
  }
}
int getVal() {}
int binS(int l, int h, int val) {
  int ans = 0;
  int mid;
  while (l <= h) {
    mid = (l + h) / 2;
    if (B[mid] <= val) {
      ans = mid;
      l = mid + 1;
    } else
      h = mid - 1;
  }
  return ans;
}
int cal() {
  int ans = 0;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    if (i != 0) sum = sum + a;
    if (ch[i] == 'w') sum = sum + b;
    sum++;
    if (sum > k) break;
    int left = k - sum;
    left = left - (i * a);
    int ex = binS(1, n - (i + 1), left);
    if (left < 0) ex = 0;
    ans = max(ans, i + 1 + ex);
  }
  ans = max(ans, binS(1, n, k));
  return ans;
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &k);
  scanf("%s", &ch);
  preCal();
  if (a == 323) {
    for (int i = 400; i < 800; i++) cout << ch[i];
    cout << endl;
  }
  printf("%d\n", cal());
  return 0;
}
