#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
int solve1(int n, int a, int b, int T, string s) {
  int pre = 0;
  vector<int> v;
  for (int i = n - 1; i >= 0; --i) {
    if (s[i] == 'w') {
      pre += b;
    }
    pre += 1;
    v.push_back(pre);
    pre += a;
  }
  int mxlen = 0;
  pre = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'w') {
      pre += b;
    }
    pre += 1;
    if (pre > T) {
      break;
    }
    int temp = (T - pre - (i + 1) * a);
    int k = upper_bound(v.begin(), v.end(), temp) - v.begin();
    mxlen = max(mxlen, i + 1);
    mxlen = max(mxlen, i + 1 + k);
    pre += a;
  }
  return min(mxlen, n);
}
int solve2(int n, int a, int b, int T, string s) {
  int pre = 0;
  vector<int> v;
  for (int i = 1; i < n; ++i) {
    if (s[i] == 'w') {
      pre += b;
    }
    pre += 1;
    v.push_back(pre);
    pre += a;
  }
  int mxlen = 0;
  pre = 0;
  if (s[0] == 'w') {
    pre += b;
  }
  pre += 1;
  if (pre > T) {
    return 0;
  }
  pre += a;
  mxlen = 1;
  for (int i = n - 1; i >= 1; --i) {
    if (s[i] == 'w') {
      pre += b;
    }
    pre += 1;
    if (pre > T) {
      break;
    }
    int temp = (T - pre - (n - i + 1) * a);
    int k = upper_bound(v.begin(), v.end(), temp) - v.begin();
    mxlen = max(mxlen, n - i + 1);
    mxlen = max(mxlen, n - i + 1 + k);
    pre += a;
  }
  return min(mxlen, n);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, a, b, T;
  cin >> n >> a >> b >> T;
  string s;
  cin >> s;
  int x = solve1(n, a, b, T, s);
  int y = solve2(n, a, b, T, s);
  cout << max(x, y) << "\n";
  return 0;
}
