#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
int upmin(T1 &x, T2 v) {
  if (x > v) {
    x = v;
    return 1;
  }
  return 0;
}
template <class T1, class T2>
int upmax(T1 &x, T2 v) {
  if (x < v) {
    x = v;
    return 1;
  }
  return 0;
}
const int INF = 0x3f3f3f3f;
int N, A, B, T;
string seq;
void init() {
  cin >> N >> A >> B >> T;
  cin >> seq;
}
int ans = 0;
void preprocess() {
  int t = 0, ptr = N;
  for (int i = N - 1; i >= 0; --i) {
    if (t + A + B * (seq[i] == 'w') + 1 > T) {
      break;
    }
    t += A + B * (seq[i] == 'w') + 1;
    --ptr;
  }
  for (int i = 0; i < N; ++i) {
    while (t + B * (seq[i] == 'w') + 1 > T and ptr < N) {
      t -= B * (seq[ptr] == 'w') + 1 + A;
      ++ptr;
    }
    if (t + B * (seq[i] == 'w') + 1 > T) {
      break;
    }
    t += B * (seq[i] == 'w') + 1 + A;
    upmax(ans, i + 1 + N - ptr);
  }
  upmin(ans, N);
}
void solve() { cout << ans << endl; }
signed main() {
  ios::sync_with_stdio(0);
  init();
  preprocess();
  solve();
  return 0;
}
