#include <bits/stdc++.h>
using namespace std;
using namespace placeholders;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<vector<int> >;
using VS = vector<string>;
using SS = stringstream;
using PII = pair<int, int>;
using VPII = vector<pair<int, int> >;
template <typename T = int>
using VT = vector<T>;
template <typename T = int>
using VVT = vector<vector<T> >;
template <typename T = int>
using LIM = numeric_limits<T>;
template <typename T>
inline istream &operator>>(istream &s, vector<T> &v) {
  for (T &t : v) {
    s >> t;
  }
  return s;
}
template <typename T>
inline ostream &operator<<(ostream &s, const vector<T> &v) {
  for (int i = 0; i < int(v.size()); ++i) {
    s << (" " + !i) << v[i];
  }
  return s;
}
template <typename T>
inline T fromString(const string &s) {
  T res;
  istringstream iss(s);
  iss >> res;
  return res;
}
template <typename T>
inline string toString(const T &a) {
  ostringstream oss;
  oss << a;
  return oss.str();
}
template <typename T>
inline bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int solve(const int N, const int A, const int B, const int T, const string &S) {
  VI times;
  transform(begin(S), end(S), back_inserter(times),
            [&](const char c) { return 1 + (c == 'w') * B; });
  VI csum(1);
  partial_sum(begin(times), end(times), back_inserter(csum));
  if (T < times[0]) {
    return 0;
  }
  if (csum.back() + (N - 1) * A <= T) {
    return N;
  }
  int res = 0;
  for (int i = (int)(1); i < (int)(N + 1); ++i) {
    const int t = T - (N - i) * 2 * A - (csum[N] - csum[i]);
    if (t < times[0]) {
      continue;
    }
    int lb = 0, ub = i;
    while (lb + 1 < ub) {
      const int mid = (lb + ub) / 2;
      (mid * A + csum[mid + 1] <= t ? lb : ub) = mid;
    }
    chmax(res, (N - i) + lb + 1);
  }
  return res;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N, A, B, T;
  cin >> N >> A >> B >> T;
  string S;
  cin >> S;
  string Sr(S);
  reverse(begin(Sr), end(Sr));
  rotate((Sr).begin(), (Sr).begin() + (N - 1), (Sr).end());
  cout << max(solve(N, A, B, T, S), solve(N, A, B, T, Sr)) << endl;
  return 0;
}
