#include <bits/stdc++.h>
using namespace std;
long long const mod = 1e9 + 7;
long long const inf = 2e18;
inline long long add(long long a, long long b) {
  return (a % mod + b % mod + mod) % mod;
}
inline long long mul(long long a, long long b) {
  return (a % mod * b % mod + mod) % mod;
}
inline long long sub(long long a, long long b) {
  return (a % mod - b % mod + mod) % mod;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long modexp(long long x, long long n) {
  if (n == 0) {
    return 1;
  } else if (n & 1) {
    return (modexp((x * x) % mod, n / 2) % mod * x % mod) % mod;
  } else {
    return (modexp((x * x) % mod, n / 2) % mod);
  }
}
long long modinv(long long n) { return modexp(n, mod - 2); }
void solve() {
  long long n, a, b, t;
  cin >> n >> a >> b >> t;
  string second;
  cin >> second;
  long long pref[n];
  long long suff[n];
  memset(pref, 0, sizeof(pref));
  memset(suff, 0, sizeof(suff));
  pref[0] = 1;
  if (second[0] == 'w') pref[0] += b;
  for (int i = 1; i < n; i++) {
    pref[i] = pref[i - 1] + 1 + a;
    if (second[i] == 'w') pref[i] += b;
  }
  suff[n - 1] = a + 1;
  if (second[n - 1] == 'w') suff[n - 1] += b;
  for (int i = n - 2; i >= 0; i--) {
    suff[i] = suff[i + 1] + 1 + a;
    if (second[i] == 'w') suff[i] += b;
  }
  reverse(suff, suff + n);
  long long ans = 0;
  if (pref[n - 1] <= t) {
    cout << n;
    return;
  }
  for (int i = 0; i < n; i++) {
    if (pref[i] <= t) {
      ans = max(ans, (long long)i + 1);
      long long temp = pref[i];
      temp = temp + i * a;
      if (temp < t) {
        int id = upper_bound(suff, suff + (n - 1 - i), t - temp) - suff;
        id--;
        if (id >= 0) ans = max(i + 1 + id + 1LL, ans);
      }
    } else
      break;
  }
  for (int i = 0; i < n; i++) {
    if (suff[i] + pref[0] <= t) {
      ans = max(ans, i + 2LL);
      long long temp = suff[i] + ((i + 1) * a) + pref[0];
      if (temp < t) {
        int id = upper_bound(pref + 1, pref + n - 1 - i, t - temp + pref[0]) -
                 (pref + 1);
        id--;
        if (id >= 0) ans = max(i + 2 + id + 1LL, ans);
      }
    } else
      break;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long T = 1;
  for (int t = 1; t <= T; t++) {
    solve();
  }
  return 0;
}
