#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1000000001;
const long long int LLINF = 1000000000000000001LL;
int solve(string &s, int n, int a, int b, int t) {
  vector<long long int> rotTime(n);
  for (int i = (0); i <= (n - 1); ++i) {
    rotTime[i] = 1 + (s[i] == 'w') * b;
  }
  vector<long long int> prefTime = rotTime, suffTime = rotTime;
  for (int i = (1); i <= (n - 1); ++i) prefTime[i] += a;
  for (int i = (0); i <= (n - 1); ++i) suffTime[i] += a;
  for (int i = (1); i <= (n - 1); ++i) prefTime[i] += prefTime[i - 1];
  for (int i = (n - 2); i >= (0); --i) suffTime[i] += suffTime[i + 1];
  int ans = 0;
  int suff = 0;
  for (int i = (0); i <= (n - 1); ++i) {
    long long int timeLeft = t - prefTime[i];
    int score = i + 1;
    if (timeLeft < 0) break;
    timeLeft -= (long long int)i * a;
    if (timeLeft >= 0) {
      suff = max(suff, i + 1);
      while (suff < n && suffTime[suff] > timeLeft) {
        suff++;
      }
      score += (n - suff);
    }
    ans = max(ans, score);
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  int ans = solve(s, n, a, b, t);
  s = s.substr(1) + s.substr(0, 1);
  reverse(s.begin(), s.end());
  ans = max(ans, solve(s, n, a, b, t));
  cout << ans;
  return 0;
}
