#include <bits/stdc++.h>
using namespace std;
int cx[] = {0, 1, 0, -1}, cy[] = {1, 0, -1, 0};
const int N = 5e5 + 5;
int n, a, b, T, cost[N];
string s;
bool check(int mid) {
  for (int i = 1; i <= mid; ++i) {
    int tmp =
        cost[i] + cost[n] - cost[n - mid + i] + min(a * (i - 1), a * (mid - i));
    if (tmp <= T) return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> a >> b >> T >> s;
  s = ' ' + s;
  memset(cost, 0, sizeof(cost));
  for (int i = 1; i <= n; ++i) {
    cost[i] = cost[i - 1] + 1;
    if (s[i] == 'w') cost[i] += b;
    if (i != 1) cost[i] += a;
  }
  int l = 0, r = n, best = 0;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (check(mid)) {
      l = mid + 1;
      best = mid;
    } else
      r = mid - 1;
  }
  cout << best;
  return 0;
}
