#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, a, b, t;
  string s;
  cin >> n >> a >> b >> t >> s;
  vector<int> acc(n + 1, 0);
  vector<int> acc2(n + 1, 0);
  for (int i = 0; i < n; i++)
    acc[i + 1] = acc[i] + a + 1 + b * (s[n - 1 - i] == 'w');
  for (int i = 0; i < n; i++) acc2[i + 1] = acc2[i] + a + 1 + b * (s[i] == 'w');
  int sum = 0;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    sum += 1;
    if (s[i - 1] == 'w') sum += b;
    if (sum <= t)
      ans = max(ans, i);
    else
      break;
    int n_sum = sum + a * (i - 1);
    int l = 0;
    int r = n - i;
    while (l != r) {
      int m = (l + r) >> 1;
      if (acc[m] + n_sum > t)
        r = m;
      else
        l = m + 1;
    }
    ans = max(ans, i + l - 1);
    sum += a;
  }
  int wo = 1 + b * (s[0] == 'w');
  sum = wo;
  if (sum <= t) {
    for (int i = n; i > 1; i--) {
      sum += a + 1;
      if (s[i - 1] == 'w') sum += b;
      if (sum <= t)
        ans = max(ans, 1 + (n - i + 1));
      else
        break;
      int n_sum = sum + (n - i) * a;
      int l = 0;
      int r = i - 1;
      while (l != r) {
        int m = (l + r) >> 1;
        if (acc2[m] + n_sum - wo > t)
          r = m;
        else
          l = m + 1;
      }
      ans = max(ans, (n - i + 1) + l - 1);
    }
  }
  cout << ans << '\n';
  return (0);
  cout << "Hola mundo" << endl;
}
