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