#include <bits/stdc++.h>
using namespace std;
template <typename T>
T sqr(T x) {
  return x * x;
}
template <typename T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T chmin(T &x, const T &y) {
  if (y < x) return x = y;
  return x;
}
template <class T>
T chmax(T &x, const T &y) {
  if (x < y) return x = y;
  return x;
}
template <class P, class Q>
ostream &operator<<(ostream &os, const pair<P, Q> &p) {
  return os << '(' << p.first << ", " << p.second << ')';
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << '{';
  bool was = false;
  for (const T &x : v) {
    if (was) os << ", ";
    was = true;
    os << x;
  }
  os << '}';
  return os;
}
template <class T>
ostream &operator<<(ostream &os, const set<T> &v) {
  os << '[';
  bool was = false;
  for (const T &x : v) {
    if (was) os << ", ";
    was = true;
    os << x;
  }
  os << ']';
  return os;
}
template <class P, class Q>
ostream &operator<<(ostream &os, const map<P, Q> &m) {
  os << '<';
  bool was = false;
  for (const auto &x : m) {
    if (was) os << ", ";
    was = true;
    os << x;
  }
  os << '>';
  return os;
}
const long long INF = (int)2e9;
const int MAXN = (int)5e5 + 10;
int n, a, b, t;
string s;
int cur = 0, ans = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> a >> b >> t >> s;
  s += s;
  s += 'w';
  n += n;
  int i = 0, j = 0;
  cur = 1 + b * (s[0] == 'w');
  while (i < n / 2) {
    if (j < i) j = i;
    while (cur + 1 + a + b * (s[j + 1] == 'w') <= t && j < n - 1)
      j++, cur += 1 + a + b * (s[j] == 'w');
    if (b <= t) chmax(ans, j - i + 1);
    cur -= 1 + b * (s[i] == 'w');
    if (j > i) cur -= a;
    i++;
  }
  cout << min(ans, n / 2);
}
