#include <bits/stdc++.h>
using namespace std;
const int N = 5 * 1000 * 100 + 10;
int dp1[N], dp2[N];
int n, a, b, t;
string s;
bool can(int mid) {
  int tim;
  for (int i = 0; i < mid; i++) {
    if (i >= mid / 2)
      tim = 2 * (mid - i - 1) + i;
    else
      tim = 2 * i + (mid - i - 1);
    tim *= a;
    tim += (dp1[i] + dp2[mid - i - 1]) * b;
    if (dp1[0] == 1) tim -= b;
    if (tim + mid <= t) return true;
  }
  return false;
}
int main() {
  cin >> n >> a >> b >> t;
  cin >> s;
  if (s[0] == 'w') dp1[0] = 1;
  for (int i = 1; i < n; i++) {
    dp1[i] = dp1[i - 1];
    if (s[i] == 'w') dp1[i]++;
  }
  if (s[0] == 'w') dp2[0] = 1;
  for (int i = 1; i < n; i++) {
    dp2[i] = dp2[i - 1];
    if (s[n - i] == 'w') dp2[i]++;
  }
  int l = 0, r = n + 1;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (can(mid))
      l = mid;
    else
      r = mid;
  }
  cout << l;
  return 0;
}
