#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using pii = pair<int, int>;
const int INF = 2147483647;
char forw[500111];
char back[500111];
LL fw[500111];
LL bw[500111];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a, b, T;
  cin >> a >> b >> T;
  string hws;
  cin >> hws;
  LL total = (hws[0] == 'w') ? b + 1 : 1;
  if (total > T) {
    cout << 0 << '\n';
    return 0;
  }
  T -= int(total);
  for (int i = 0; i < int(n - 1); ++i) {
    forw[i] = (hws[1 + i] == 'w');
    back[i] = (hws[n - 1 - i] == 'w');
  }
  fw[0] = 0;
  bw[0] = 0;
  for (int i = 0; i < int(n - 1); ++i) {
    fw[i + 1] = fw[i] + a + 1 + b * LL(forw[i]);
    bw[i + 1] = bw[i] + a + 1 + b * LL(back[i]);
  }
  int rr = 1;
  for (int i = 0; i < int(n); ++i) {
    LL budget = T - fw[i];
    if (budget < 0) break;
    if (i == n - 1) {
      rr = n;
      break;
    }
    int here = 1 + i;
    budget -= a * i;
    if (budget >= 0) {
      int how_far = upper_bound(bw, bw + n, budget) - bw - 1;
      here += how_far;
    }
    rr = max(rr, here);
  }
  for (int i = 0; i < int(n); ++i) {
    LL budget = T - bw[i];
    if (budget < 0) break;
    if (i == n - 1) {
      rr = n;
      break;
    }
    int here = 1 + i;
    budget -= a * i;
    if (budget >= 0) {
      int how_far = upper_bound(fw, fw + n, budget) - fw - 1;
      here += how_far;
    }
    rr = max(rr, here);
  }
  cout << min(n, rr) << '\n';
  return 0;
}
