#include <bits/stdc++.h>
using namespace std;
long long dp[500009], dp2[500009];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long l, next, turn, T;
  cin >> l >> next >> turn >> T;
  string s;
  cin >> s;
  s = '$' + s;
  for (long long i = 1; i <= l; i++) {
    dp[i] = dp[i - 1];
    if (i != 1) dp[i] += next;
    if (s[i] == 'w') dp[i] += turn;
    dp[i] += 1;
  }
  for (long long i = 1; i <= l; i++) {
    long long j = l + 1 - i;
    dp2[i] = dp2[i - 1];
    dp2[i] += next;
    if (s[j] == 'w') dp2[i] += turn;
    dp2[i] += 1;
  }
  long long ans = 0LL;
  for (long long i = 1; i <= l; i++) {
    if (dp[i] > T) continue;
    ans = max(ans, i);
    long long timespent = dp[i] + (i - 1) * next;
    long long timeleft = T - timespent, x = 0;
    if (timeleft >= 0) {
      x = upper_bound(dp2 + 1, dp2 + l + 1, timeleft) - dp2;
      x--;
    }
    ans = max(ans, min(l, i + x));
  }
  cout << ans << endl;
}
