#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a, b, T;
  cin >> n >> a >> b >> T;
  string s;
  cin >> s;
  long long init = 1;
  if (s[0] == 'w') init += b;
  vector<long long> dp(n, INT_MAX);
  dp[0] = 0;
  for (long long i = 1; i < n; i++) {
    dp[i] = dp[i - 1] + a + 1;
    if (s[i] == 'w') dp[i] += b;
  }
  vector<long long> rdp(n, INT_MAX);
  rdp[0] = 0;
  for (long long i = 1; i < n; i++) {
    rdp[i] = rdp[i - 1] + a + 1;
    if (s[n - 1 - (i - 1)] == 'w') rdp[i] += b;
  }
  long long ans = 0;
  if (init <= T) ans = 1;
  for (long long i = 0; i < n; i++) {
    long long t = T - (init + dp[i] + i * a);
    if (t < 0) continue;
    int left = 0, right = n + 1;
    while (left + 1 != right) {
      int mid = (left + right) / 2;
      if (rdp[mid] <= t)
        left = mid;
      else
        right = mid;
    }
    long long a = i + left + 1;
    ans = max(ans, a);
  }
  cout << min(n, ans) << endl;
}
