#include <bits/stdc++.h>
using namespace std;
long long fastpow(long long x, long long y) {
  if (!y) return 1;
  if (y % 2) return (x * fastpow(x, y - 1));
  return fastpow((x * x), y / 2);
}
long long bs(long long s, long long e, long long targ, vector<long long> &v) {
  long long mid, ans = 0;
  while (s <= e) {
    mid = (s + e) / 2;
    if (v[mid] <= targ) {
      ans = mid;
      s = mid + 1;
    } else
      e = mid - 1;
  }
  return ans;
}
int main() {
  vector<long long> v1, v2;
  long long n, a, b, t, c[500005], r1[500005] = {}, r2[500005] = {};
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  if (((s[0] == 'w') * b) + 1 > t) return cout << 0 << endl, 0;
  for (int i = 0; i < n; i++) {
    c[i] = ((s[i] == 'w') * b) + 1;
  }
  r1[0] = ((s[0] == 'w') * b) + 1;
  for (int i = 1; i < n; i++) {
    r1[i] = r1[i - 1] + c[i] + a;
  }
  r2[n - 1] = ((s[n - 1] == 'w') * b) + a + 1;
  for (int i = n - 2; i >= 0; i--) {
    r2[i] = r2[i + 1] + c[i] + a;
  }
  for (int i = 1; i < n; i++) v1.push_back(r2[i]);
  sort(v1.begin(), v1.end());
  for (int i = 1; i < n; i++) v2.push_back(r1[i]);
  sort(v2.begin(), v2.end());
  long long one = bs(0, v1.size() - 1, t, v1),
            two = bs(0, v2.size() - 1, t, v2);
  long long mx = 0;
  for (int i = 0; i < n - 1; i++) {
    long long cnt = v2[i];
    if (cnt <= t) {
      long long back = cnt + ((i + 1) * a);
      if (back <= t) {
        if (t - back < v1[0]) break;
        long long ans = bs(0, v1.size() - 1, t - back, v1);
        if (ans + 1 + i + 2 >= n) return cout << n, 0;
        mx = max(ans + 1 + i + 2, mx);
      } else
        mx = max(mx, (long long)i + 2);
    }
  }
  long long mx2 = 0;
  for (int i = 0; i < n - 1; i++) {
    long long cnt = v1[i];
    if (cnt + r1[0] <= t) {
      long long back = cnt + ((i + 1) * a);
      if (back + r1[0] <= t) {
        if (t - back < v2[0]) break;
        long long ans = bs(0, v2.size() - 1, t - back, v2);
        if (ans + 2 + i + 1 >= n) return cout << n, 0;
        mx2 = max(ans + 2 + i + 1, mx2);
      } else
        mx2 = max(mx2, (long long)i + 2);
    }
  }
  long long m = max(one, two);
  cout << max(max(mx, mx2), max(m, (long long)1));
  return 0;
}
