#include <bits/stdc++.h>
using namespace std;
const long long int N = 5e5;
long long int a, b, n, T;
string orient;
long long int cost[N];
vector<long long int> lef, rig;
int main() {
  cin >> n >> a >> b >> T;
  cin >> orient;
  lef.resize(n);
  rig.resize(n);
  for (long long int i = 0; i < n; i++) {
    if (orient[i] == 'w')
      cost[i] = b + 1;
    else
      cost[i] = 1;
  }
  lef[0] = cost[0];
  for (long long int i = 1; i < n; i++) lef[i] = lef[i - 1] + a + cost[i];
  rig[0] = cost[n - 1] + a;
  for (long long int i = n - 2; i >= 0; i--)
    rig[n - 1 - i] = rig[n - 2 - i] + a + cost[i];
  long long int ans = 0;
  for (long long int i = 0; i < n; i++) {
    if (lef[i] > T) break;
    long long int tans = i + 1;
    long long int temp = T - lef[i] - i * a;
    long long int num =
        (upper_bound(rig.begin(), rig.end(), temp) - rig.begin());
    if (num > n - i - 1)
      tans = n;
    else
      tans += num;
    ans = max(ans, tans);
  }
  cout << ans << endl;
  return 0;
}
