#include <bits/stdc++.h>
using namespace std;
int findr(vector<long long> &v1, vector<long long> &v2, long long t,
          long long left, int &right, long long a) {
  if (left == 0) {
    int m = 0;
    for (int i = right; i < v2.size(); ++i) {
      if (t >= v2[i]) {
        m = i;
      } else {
        break;
      }
    }
    right = m;
    return m;
  }
  t -= v1[left];
  t += v1[1];
  t -= left * a - a;
  int m = 0;
  for (int i = right; i < v2.size(); ++i) {
    if (t >= v2[i]) {
      m = i;
    } else {
      break;
    }
  }
  right = m;
  return m;
}
long long foo(vector<long long> &v1, vector<long long> &v2, long long t,
              long long a) {
  int m = 0;
  for (int i = 0; i < v1.size(); ++i) {
    if (t >= v1[i]) {
      m = i;
    } else {
      break;
    }
  }
  int left = m;
  int right = 0;
  while (left) {
    findr(v1, v2, t, left, right, a);
    m = max(m, left + right - (left != 0 and right != 0));
    --left;
  }
  return m;
}
int main() {
  long long n, a, b, t;
  string s;
  cin >> n >> a >> b >> t >> s;
  vector<long long> v1, v2;
  v1.push_back(-a);
  v2.push_back(-a);
  for (int i = 0; i < s.size(); ++i) {
    v1.push_back(v1.back() + a + 1 + b * (s[i] == 'w'));
  }
  s.push_back(s[0]);
  reverse(s.begin(), s.end());
  s.pop_back();
  for (int i = 0; i < s.size(); ++i) {
    v2.push_back(v2.back() + a + 1 + b * (s[i] == 'w'));
  }
  if (t >= v1.back()) {
    cout << n;
    return 0;
  }
  long long m = max(foo(v1, v2, t, a), foo(v2, v1, t, a));
  cout << m;
  return 0;
}
