#include <bits/stdc++.h>
using namespace std;
inline long double min(long double a, long double b) {
  if (a < b) return a;
  return b;
}
inline long double max(long double a, long double b) {
  if (a < b) return b;
  return a;
}
int n;
long long a, b;
long long T;
string s;
long long prefix[500100];
long long suffix[500100];
bool valid(int num) {
  long long res = INT_MAX;
  for (int right = 1; right <= num; right++) {
    int left = num - right;
    long long costRight = prefix[right - 1];
    long long costLeft = 0;
    if (left != 0) costLeft = suffix[left - 1];
    long long cost = costRight + costLeft;
    cost += 1LL * min(right - 1, left) * a;
    res = min(res, cost);
  }
  return res <= T;
}
long long calc(int index) {
  long long res = 1;
  if (s[index] == 'w') res += b;
  return res;
}
int solve() {
  int tmp = 1;
  if (s[0] == 'w') tmp += b;
  if (tmp > T) return 0;
  prefix[0] = tmp;
  suffix[0] = calc(n - 1) + a;
  for (int(i) = (1); (i) < (n); ++(i)) {
    prefix[i] = prefix[i - 1] + calc(i) + a;
  }
  for (int(i) = (1); (i) < (n); ++(i)) {
    suffix[i] = suffix[i - 1] + calc(n - i - 1) + a;
  }
  int low = 1;
  int high = n;
  while (low < high) {
    int m = (low + high + 1) / 2;
    if (valid(m))
      low = m;
    else
      high = m - 1;
  }
  return low;
}
int main() {
  cin.tie(0);
  cin.sync_with_stdio(false);
  cin >> n >> a >> b >> T;
  cin >> s;
  cout << solve() << endl;
  return 0;
}
