#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long int INFF = 1e17;
const double EPS = 1e-9;
const long long int MOD = 1e9 + 7;
const int MAXN = 5e5 + 10;
long long int n, a, b, t, ans = 0, r_sum[MAXN], l_sum[MAXN];
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> a >> b >> t;
  cin >> s;
  long long int t1 = a, f = 1;
  f += (s[0] == 'w' ? b : 0);
  for (int i = (1); i < (n); ++i) {
    t1++;
    if (s[i] == 'w') t1 += b;
    l_sum[i] = t1;
    t1 += a;
  }
  t1 = a;
  for (int i = n - 1; i > 0; i--) {
    t1++;
    if (s[i] == 'w') t1 += b;
    r_sum[i] = t1;
    t1 += a;
  }
  for (int i = (0); i < (n); ++i)
    if ((l_sum[i] + f) <= t) ans = max(ans, i + 1LL);
  for (int i = n - 1; i > 0; i--)
    if ((r_sum[i] + f) <= t) ans = max(ans, n - i);
  if (f <= t) {
    long long int l = 1, r = n - 1;
    while (l != r) {
      long long int curr = n - r + l + 1,
                    t1 = r_sum[r] + l_sum[l] + f + a * min(n - r, l);
      if (t1 <= t) ans = max(ans, curr);
      if (r_sum[r - 1] <= l_sum[l + 1])
        r--;
      else
        l++;
    }
  }
  cout << ans << '\n';
  return 0;
}
