#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.14159265358979323;
const long long int linf = 1000111000111000111LL;
const long long int inf = 1011111111;
const long long int N = 350;
long long int n, a, b, ti;
string s1;
long long int dp[1000005];
bool func(long long int win) {
  if (win == 1) {
    if (dp[1] + 1 <= ti)
      return true;
    else
      return false;
  }
  if (win == 2) {
    long long int q1 = dp[n + 1] - dp[n - 1] + a + 2;
    long long int q2 = dp[n + 2] - dp[n] + a + 2;
    long long int mn = min(q1, q2);
    if (mn <= ti)
      return true;
    else
      return false;
  }
  long long int q1 = dp[n + win] - dp[n] + (a * (win - 1)) + win;
  long long int q2 = dp[n + 1] - dp[n - win + 1] + (a * (win - 1)) + win;
  long long int req = min(q1, q2);
  for (long long int i = 1; i < win - 1; i++) {
    long long int cnt = dp[n + win - i] - dp[n - i] + (a * (win - 1));
    long long int side = min(i, win - i - 1);
    cnt += a * side;
    cnt += win;
    req = min(req, cnt);
  }
  if (req <= ti)
    return true;
  else
    return false;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int test = 1;
  while (test--) {
    cin >> n >> a >> b >> ti;
    cin >> s1;
    string t = s1 + s1;
    for (long long int i = 1; i <= 2 * n; i++) {
      if (t[i - 1] == 'w')
        dp[i] = dp[i - 1] + b;
      else
        dp[i] = dp[i - 1];
    }
    long long int start = 1;
    long long int end = n;
    long long int ans = 0;
    while (start <= end) {
      if (start == end) {
        if (func(start)) ans = start;
        break;
      }
      long long int mid = (start + end) / 2;
      if (func(mid)) {
        ans = mid;
        start = mid + 1;
      } else
        end = mid - 1;
    }
    cout << ans << "\n";
  }
  cerr << '\n'
       << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms\n";
}
