#include <bits/stdc++.h>
using namespace std;
int arr[1000000], rev[1000000];
int main() {
  int n, a, b, t, ini, i, j, sz, val, ans;
  string str;
  ios::sync_with_stdio(false);
  cin >> n >> a >> b >> t;
  cin >> str;
  sz = str.size();
  ini = (str[0] == 'w') ? b + 1 : 1;
  for (i = 1; i < sz; i++) {
    val = 0;
    if (str[i] == 'w') val += b;
    val += 1;
    if (i == 1)
      arr[i] = val + a;
    else {
      arr[i] = arr[i - 1] + a + val;
    }
  }
  for (i = sz - 1; i >= 1; i--) {
    val = 0;
    if (str[i] == 'w') val += b;
    val += 1;
    if (i == sz - 1)
      rev[i] = val + a;
    else
      rev[i] = rev[i + 1] + a + val;
  }
  arr[0] = rev[0] = 0;
  for (i = sz - 1; i >= 0; i--) {
    if ((arr[i] + ini) <= t) break;
  }
  ans = 0;
  if (i < 0) {
    cout << "0" << endl;
    return 0;
  } else {
    ans = max(ans, ans + i + 1);
  }
  j = i;
  for (i = 1; i <= sz - 1; i++) {
    if ((rev[i] + ini) <= t) break;
  }
  ans = max(ans, (sz - i) + 1);
  if (j == sz - 1) {
    cout << str.size() << endl;
    return 0;
  }
  for (i = sz - 1; i >= 1; i--) {
    if (i == j) j--;
    while (j > 0) {
      val = arr[j] + rev[i] + min(sz - i, j) * a + ini;
      if (val <= t) {
        ans = max(ans, sz - i + 1 + j);
        break;
      }
      j--;
    }
  }
  cout << ans << endl;
  return 0;
}
