#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int inf = 2e9 + 5;
double PI = 3.14159265358979323846;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
void solve() {
  int n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  vector<int> pre(n + 5, 0);
  vector<int> suf(n + 5, 0);
  for (int i = 0; i < n; i++) {
    int now = (s[i] == 'w' ? b : 0) + 1;
    if (i) now += a;
    pre[i + 1] = pre[i] + now;
  }
  for (int i = n - 1; i >= 0; i--) {
    int now = (s[i] == 'w' ? b : 0) + 1;
    if (i < n - 1) now += a;
    suf[i + 1] = suf[i + 2] + now;
  }
  int ans = 0;
  for (int i = 1, j = i + 1; i <= n; i++) {
    if (j <= i) {
      j = i + 1;
    }
    if (pre[i] <= t) {
      ans = max(ans, i);
    }
    int now = pre[i] + i * a;
    while (now + suf[j] > t and j <= n + 1) {
      j++;
    }
    if (j <= n) {
      ans = max(ans, i + (n - j + 1));
    }
  }
  for (int j = n, i = j - 1; j > 1; j--) {
    if (i >= j) {
      i = j - 1;
    }
    if (suf[j] + a + pre[1] <= t) {
      ans = max(ans, 1 + (n - j + 1));
    }
    int now = suf[j] + (n - j + 1) * 2 * a;
    while (now + pre[i] > t and i > 0) {
      i--;
    }
    if (i >= 1 and i < j) {
      ans = max(ans, i + (n - j + 1));
    }
  }
  cout << ans << "\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
