#include <bits/stdc++.h>
using namespace std;
int n, a, b, t, w[555555];
string s;
bool check(int x) {
  for (int i = 1; i <= x; i++) {
    int sum1 = w[i] + w[n] - w[n - (x - i)],
        sum2 =
            min((i - 1) * a * 2 + (x - i) * a, (i - 1) * a + (x - i) * a * 2);
    if (sum1 + sum2 <= t) {
      return true;
    }
  }
  return false;
}
int main() {
  cin >> n >> a >> b >> t >> s;
  for (int i = 1; i <= n; i++) {
    w[i] = w[i - 1] + 1 + (s[i - 1] == 'w' ? b : 0);
  }
  int l = 0, r = n;
  while (l < r) {
    int mid = (l + r + 1) / 2;
    if (check(mid)) {
      l = mid;
    } else {
      r = mid - 1;
    }
  }
  cout << l << endl;
  return 0;
}
