#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1);
string to_string(bool b) { return b ? "true" : "false"; }
string to_string(const char* s) { return string(s); }
string to_string(string s) { return s; }
string to_string(vector<bool> v) {
  string res;
  for (long long int i = 0; i < (long long int)(v).size(); i++)
    res += char('0' + v[i]);
  return res;
}
template <size_t S>
string to_string(bitset<S> b) {
  string res;
  for (long long int i = 0; i < b; i++) res += char('0' + b[i]);
  return res;
}
template <class T>
string to_string(T v) {
  bool f = 1;
  string res;
  for (auto x : v) {
    if (!f) res += ' ';
    f = 0;
    res += to_string(x);
  }
  return res;
}
template <class A>
void write(A x) {
  cout << to_string(x);
}
template <class H, class... T>
void write(const H& h, const T&... t) {
  write(h);
  write(t...);
}
void print() { cout << ("\n"); }
template <class H, class... T>
void print(const H& h, const T&... t) {
  write(h);
  if (sizeof...(t)) write(' ');
  print(t...);
}
void DBG() { cerr << "]" << endl; }
template <class H, class... T>
void DBG(H h, T... t) {
  cerr << to_string(h);
  if (sizeof...(t)) cerr << ", ";
  DBG(t...);
}
const long long int N = 2e5;
const long long int MOD = 1e9 + 7;
void solve() {
  long long int n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  set<array<long long int, 3> > suff;
  long long int cur = 0, ans = 0;
  for (long long int i = n - 1; i >= 0; i--) {
    cur += a + 1;
    if (s[i] == 'w') cur += b;
    suff.insert({cur, i});
  }
  cur = 0;
  for (long long int i = 0; i < n; i++) {
    cur += 1;
    if (s[i] == 'w') cur += b;
    auto it = suff.lower_bound({t - cur - a * i + 1, 0});
    if (cur <= t) ans = max(ans, i + 1);
    cur += a;
    if (it == suff.begin()) {
      continue;
    }
    --it;
    if ((*it)[1] <= i)
      ans = n;
    else
      ans = max(ans, i + 1 + (n - (*it)[1]));
  }
  cout << ans;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  clock_t time = clock();
  long long int t = 1;
  for (long long int i = 0; i < t; i++) {
    solve();
  }
  double time_taken = ((double)(clock() - time)) / CLOCKS_PER_SEC;
  cerr << "LINE(" << 104 << ") -> ["
       << "time_taken"
       << "]: [",
      DBG(time_taken);
  return 0;
}
