#include <bits/stdc++.h>
using namespace std;
int n, a, b, T, x[500005], l[500005], r[500005], re, c;
char t;
int main() {
  cin >> n >> a >> b >> T;
  re = 0;
  for (int i = 0; i < n; i++) {
    cin >> t;
    if (t == 'w')
      x[i] = 1;
    else
      x[i] = 0;
  }
  if (x[0] == 1)
    T -= (b + 1);
  else
    T -= 1;
  if (T < 0)
    cout << 0 << endl;
  else if (T == 0)
    cout << 1 << endl;
  else {
    l[0] = 0;
    for (int i = 1; i < n; i++) {
      if (x[i] == 1)
        l[i] = l[i - 1] + b + a + 1;
      else
        l[i] = l[i - 1] + a + 1;
    }
    r[0] = 0;
    for (int i = 1; i < n; i++) {
      if (x[n - i] == 1)
        r[i] = r[i - 1] + b + a + 1;
      else
        r[i] = r[i - 1] + a + 1;
    }
    for (int i = 0; i < n; i++) {
      if (l[i] > T) break;
      if (l[i] + i * a >= T)
        re = max(re, i + 1);
      else {
        c = upper_bound(r, r + n, (T - l[i] - i * a)) - r;
        c--;
        if (c >= n - i - 1)
          re = max(re, n);
        else
          re = max(re, i + 1 + c);
      }
    }
    for (int i = 0; i < n; i++) {
      if (r[i] > T) break;
      if (r[i] + i * a >= T)
        re = max(re, i + 1);
      else {
        c = upper_bound(l, l + n, (T - r[i] - i * a)) - l;
        c--;
        if (c >= n - i - 1)
          re = max(re, n);
        else
          re = max(re, i + 1 + c);
      }
    }
    cout << re << endl;
  }
  return 0;
}
