#include <bits/stdc++.h>
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, a, b, t;
  bool d = 0;
  std::cin >> n >> a >> b >> t;
  std::vector<int> v;
  std::vector<int> lv;
  v.reserve(n);
  lv.reserve(n);
  for (int i = 0; i < n; ++i) {
    char c;
    std::cin >> c;
    if (c == 'w')
      v[i] = 1 + b;
    else
      v[i] = 1;
    lv[n - 1 - i] = v[i];
  }
  for (int i = 0; i < n; ++i) {
    lv[i] += a;
    if (i > 0) {
      v[i] += a;
      lv[i] += lv[i - 1];
      v[i] += v[i - 1];
    }
  }
  int ans = 0;
  for (int i = 0; i < n && (t - v[i]) >= 0; ++i) {
    int tr = t - v[i] - a * (i);
    int l = 0, r = n - i - 2;
    while (l < r) {
      int m = l + (r - l + 1) / 2;
      if (lv[m] <= tr) {
        l = m;
      } else
        r = m - 1;
    }
    if (lv[0] > tr || n - i == 1) --l;
    std::cout << l << " " << tr << "\n";
    ans = std::max(ans, i + 1 + l + 1);
  }
  std::cout << ans;
  return 0;
}
