#include <bits/stdc++.h>
using namespace std;
long long int N, a, b, T;
string ip;
long long int front[500010], back[500010];
std::vector<long long int> vvv;
int main() {
  scanf("%lld %lld %lld %lld", &N, &a, &b, &T);
  cin >> ip;
  ip = "*" + ip;
  front[1] = 1;
  if (ip[1] == 'w') front[1] = front[1] + b;
  for (int i = 2; i <= N; i++) {
    front[i] = front[i - 1] + a + 1LL;
    if (ip[i] == 'w') front[i] = front[i] + b;
  }
  int ttt = front[1];
  int index;
  long long int ans = 0;
  for (index = N; index >= 1; index--) {
    if (ip[index] == 'w') ttt += b;
    ttt += 1;
    if (ttt > T) break;
    ttt += a;
  }
  ans = max(ans, N - index + 1);
  back[N] = a;
  if (ip[N] == 'w') back[N] += b;
  for (long long int i = N - 1; i >= 1; i--) {
    back[i] = back[i + 1] + a + 1LL;
    if (ip[i] == 'w') back[i] = back[i] + b;
  }
  for (long long int i = N; i >= 1; i--) vvv.push_back(back[i]);
  long long int avail, curr, j;
  std::vector<long long int>::iterator it;
  long long int id;
  for (long long int i = 1; i <= N && front[i] <= T; i++) {
    avail = T - front[i];
    curr = i;
    ans = max(ans, i);
    avail = avail - (a * (i - 1LL));
    it = lower_bound(vvv.begin(), vvv.end(), avail);
    if ((*it) == avail)
      curr = curr + it - vvv.begin() + 1;
    else {
      curr = curr + it - vvv.begin();
    }
    if (curr >= N) curr = N;
    ans = max(ans, curr);
  }
  cout << ans << endl;
  return 0;
}
