#include <bits/stdc++.h>
using namespace std;
long long int rt[500090 + 5];
long long int lt[500090 + 5];
int main() {
  long long int n, a, b, t;
  cin >> n >> a >> b >> t;
  string st;
  cin >> st;
  st = ' ' + st;
  for (long long int i = 2; i <= n; i++)
    rt[i] = rt[i - 1] + a + 1 + b * (st[i] == 'w');
  for (long long int i = n; i >= 2; i--)
    lt[i] = lt[i + 1] + a + 1 + b * (st[i] == 'w');
  t -= 1 + b * (st[1] == 'w');
  long long int ans = 0;
  for (long long int i = 1, j = 2; i <= n; i++) {
    if (rt[i] > t) break;
    while (j <= n && rt[i] + lt[j] + (i - 1) * a > t) j++;
    ans = max(ans, i + n - j + 1);
  }
  for (long long int i = n + 1, j = n; i >= 2; i--) {
    if (lt[i] > t) break;
    while (j >= 1 && lt[i] + rt[j] + (n - i + 1) * a > t) j--;
    ans = max(ans, n - i + 1 + j);
  }
  cout << min(ans, n) << endl;
}
