#include <bits/stdc++.h>
#pragma GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int MAX = 1e6 + 5;
const long long MAX2 = 11;
const long long MOD = 420691273;
const long long MOD2 = 2010405347;
const long long INF = 2e18;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
const double pi = acos(-1);
const double EPS = 1e-9;
const int block = 555;
long long n, a, b, t, x[MAX], y[MAX], ans, z[MAX], tmp, nw, le, ri, mid, res;
char c;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> a >> b >> t;
  for (int i = 1; i <= n; ++i) {
    cin >> c;
    z[i] = (c == 'w') * b;
  }
  t -= z[1] + 1;
  if (t < 0) return cout << "0\n", 0;
  ans = 1;
  for (int i = 2; i <= n; ++i) {
    x[i] = x[i - 1] + z[i] + a + 1;
    if (t >= x[i]) ans = max(ans, (long long)i);
  }
  for (int i = n; i >= 2; --i) {
    y[i] = y[i + 1] + z[i] + a + 1;
    if (t >= y[i]) ans = max(ans, n - i + 2);
  }
  if (ans == n) return cout << ans << '\n', 0;
  for (int i = 2; i <= n; ++i) {
    tmp = t - x[i] - (i - 1) * a;
    if (tmp > 0) {
      le = i + 1, ri = n, res = 0;
      while (le <= ri) {
        mid = le + ri >> 1;
        if (tmp < y[mid])
          le = mid + 1;
        else
          res = n - mid + 1, ri = mid - 1;
      }
      ans = max(ans, i + res);
    }
    tmp = t - y[n - i + 2] - (i - 1) * a;
    if (tmp > 0) {
      le = 2, ri = n - i + 1, res = 0;
      while (le <= ri) {
        mid = le + ri >> 1;
        if (tmp < x[mid])
          ri = mid - 1;
        else
          res = mid - 1, le = mid + 1;
      }
      ans = max(ans, i + res);
    }
  }
  cout << ans << '\n';
  return 0;
}
