#include <bits/stdc++.h>
using namespace std;
int a, b;
int getSeconds(char c) { return b * (c == 'w') + 1; }
void getAcc(const string &str, vector<int> &acc) {
  for (int i = str.size() - 1, ind = 0; i >= 0; i--, ind++) {
    acc[ind] = a + getSeconds(str[i]);
    if (ind) acc[ind] += acc[ind - 1];
  }
}
int getMax(const string &str, const vector<int> &acc, int t) {
  int maxi = 0;
  for (int i = 0; i < (int)str.size() && t - getSeconds(str[i]) >= 0; i++) {
    int num = i + 1;
    t -= getSeconds(str[i]);
    if (acc.end() - i - 1 >= acc.begin()) {
      vector<int>::const_iterator it =
          lower_bound(acc.begin(), acc.end() - i - 1, t - i * a);
      if (it != acc.end() - i - 1) {
        num += (it - acc.begin());
        if (*it <= t - i * a) num++;
      }
    }
    maxi = max(num, maxi);
    t -= a;
  }
  return maxi;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, t;
  string str, str2;
  cin >> n >> a >> b >> t;
  cin >> str;
  for (int i = str.size(); i > 0; i--) {
    str2 += str[i % (str.size())];
  }
  vector<int> acc(str.size()), acc2(str.size());
  getAcc(str, acc);
  getAcc(str2, acc2);
  cout << max(getMax(str, acc, t), getMax(str2, acc2, t)) << endl;
  return 0;
}
