#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
const int MOD = 1e9 + 7;
long long qpow(long long a, long long b, long long m) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int tt = 1;
  while (tt--) {
    int n, a, b, t;
    cin >> n >> a >> b >> t;
    string second;
    cin >> second;
    int l = 0, r = n, mid;
    long long sum[n];
    sum[0] = 1 + (second[0] == 'w') * b;
    for (int i = 1; i < n; i++) {
      sum[i] = sum[i - 1] + a + 1 + (second[i] == 'w') * b;
    }
    while (l < r) {
      mid = (l + r) / 2;
      bool ok = false;
      long long ss = sum[mid - 1];
      long long cur = ss;
      for (int i = mid - 2; i >= 0; i--) {
        cur = cur - (second[i + 1] == 'w') * b +
              (second[n - (mid - 1 - i)] == 'w') * b -
              min(i + 1, mid - 1 - (i + 1)) * a + min(i, mid - 1 - i) * a;
        ss = min(cur, ss);
      }
      if (ss <= t)
        l = mid + 1;
      else
        r = mid;
    }
    if (l < n) {
      cout << max(0, l - 1);
      return 0;
    }
    if (second[n - 1] <= t)
      cout << n;
    else
      cout << max(0, n - 1);
    cout << "\n";
  }
}
