#include <bits/stdc++.h>
using namespace std;
long long dp[1000005];
long long dp1[1000005];
long long n, a, b, t;
bool check(long long len) {
  for (int i = 0; i <= len - 1; i++) {
    long long p = dp1[i] + dp[len - i];
    if (i > 0)
      p += ((len - i - 1) * a * 2) + ((i)*a);
    else {
      p += (len - i - 1) * a;
    }
    long long q = dp1[i] + dp[len - i];
    q += (i * 2 * a) + ((len - i - 1) * a);
    if (p <= t || q <= t) return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  for (int i = 1; i <= n; i++) {
    if (s[i - 1] == 'w') {
      dp[i] += 1 + b;
    } else {
      dp[i] = 1;
    }
  }
  long long c = 0;
  for (int i = n - 1; i >= 1; i--) {
    c++;
    if (s[i] == 'w') {
      dp1[c] = 1 + b;
    } else {
      dp1[c] = 1;
    }
  }
  for (int i = 1; i <= n; i++) {
    dp[i] += dp[i - 1];
    dp1[i] += dp1[i - 1];
  }
  int l = 1, r = n;
  long long ans = 0;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (check(mid)) {
      ans = mid;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  cout << ans << endl;
}
