#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void err(istream_iterator<string> it) { cout << '\n'; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  string s = typeid(a).name();
  cout << "[" << *it << " = ";
  cout << a;
  cout << "] ";
  err(++it, args...);
}
pair<int, int> dx[] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const int inf = 2e9 + 7;
const long long INF = 9e18 + 7;
const double eps = 1e-6;
int mod = 998244353;
const long long MOD = 1e15 + 7;
const bool multiple_tests = 0;
const int N = 5e5 + 7;
int suff[N];
void solve() {
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  bool ok[n + 1];
  for (int i = 1; i <= n; i++) {
    char c;
    cin >> c;
    ok[i] = 0;
    if (c == 'w') ok[i] = 1;
  }
  int ans = 0, cp = t;
  suff[n] = 1 + ok[n] * b;
  for (int i = n - 1; i >= 1; i--) {
    suff[i] = suff[i + 1] + a + 1 + ok[i] * b;
  }
  for (int i = 1; i <= n; i++) {
    t--;
    t -= ok[i] * b;
    if (t < 0) break;
    int have = t - a * i;
    int l = i + 1, r = n + 1;
    t -= a;
    while (l < r) {
      int mid = (l + r) / 2;
      if (suff[mid] > have) {
        l = mid + 1;
      } else {
        r = mid;
      }
    }
    ans = max(ans, i + (n - l + 1));
  }
  reverse(ok + 2, ok + n + 1);
  suff[n] = 1 + ok[n] * b;
  t = cp;
  for (int i = n - 1; i >= 1; i--) {
    suff[i] = suff[i + 1] + a + 1 + ok[i] * b;
  }
  for (int i = 1; i <= n; i++) {
    t--;
    t -= ok[i] * b;
    if (t < 0) break;
    int have = t - a * i;
    int l = i + 1, r = n + 1;
    t -= a;
    while (l < r) {
      int mid = (l + r) / 2;
      if (suff[mid] > have) {
        l = mid + 1;
      } else {
        r = mid;
      }
    }
    ans = max(ans, i + (n - l + 1));
  }
  cout << ans;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int TT = 1;
  if (multiple_tests) cin >> TT;
  for (int testcase = 1; testcase <= TT; testcase++) {
    solve();
    cout << '\n';
  }
  return 0;
}
