#include <bits/stdc++.h>
int const N = 1e6 + 6;
using namespace std;
long long n, m, k, i, j, a, b, x, y, ans, ev, T;
char bt[N], ct[N];
vector<long long> adj[N];
vector<long long> res;
string st;
long long o[N], l[N], r[N], d[N], diff[N], pa[N], sum[N], arr[N];
bool solve(long long mid) {
  for (i = 1; i <= mid; i++) {
    long long t1 = l[i] + (l[n] - l[n - (mid - i)]);
    long long t2 = min((mid - i) * a + (i - 1ll) * a * 2ll,
                       (mid - i) * a * 2ll + (i - 1ll) * a);
    if (t1 + t2 <= T) return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> a >> b >> T;
  cin >> st;
  for (i = 1; i <= n; i++) {
    l[i] = l[i - 1] + 1;
    if (st[i - 1] == 'w') l[i] += b;
  }
  long long left = 0, right = n;
  while (left <= right) {
    long long mid = (left + right) >> 1ll;
    if (solve(mid)) {
      ans = mid;
      left = mid + 1ll;
    } else
      right = mid - 1ll;
  }
  cout << ans << endl;
}
