#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
const long long MOD = 1000000007;
long long fast_exp(long long base, long long exp, long long mod) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % mod;
    base = (base * base) % mod;
    exp /= 2;
  }
  return res;
}
long long a[5 * N + 11];
long long s1[5 * N + 11];
long long s2[5 * N + 11];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  s1[0] = (1 + b * (s[0] == 'w'));
  s2[n] = 0;
  for (int i = 1; i < n; i++) s1[i] = (s1[i - 1] + 1 + b * (s[i] == 'w') + a);
  for (int i = n - 1; i >= 0; i--)
    s2[i] = (s2[i + 1] + 1 + b * (s[i] == 'w') + a);
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (s1[i] <= t) {
      int l, r;
      l = i + 1, r = n - 1;
      while (l <= r) {
        int mid = (l + r) >> 1;
        if (s1[i] + s2[mid] + min(i, n - mid) * a <= t)
          r = mid - 1;
        else
          l = mid + 1;
      }
      ans = max(ans, i + 1 + n - l);
    }
  }
  cout << ans;
  return 0;
}
