#include <bits/stdc++.h>
using namespace std;
long long gcd1(long long a, long long b) {
  if (a == 0) return b;
  return gcd1(b % a, a);
}
long long modx(long long base, long long ex) {
  long long ans = 1LL, val = base;
  while (ex > 0LL) {
    if (ex & 1LL) ans = (ans * val) % 1000000009LL;
    val = (val * val) % 1000000009LL;
    ex = ex >> 1LL;
  }
  return ans;
}
long long dp1[300005];
long long dp2[300005];
int n;
long long a, b, T;
int find1(long long v, int pos) {
  int l = 2, r = pos;
  int ans = 1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (dp1[mid] <= v) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return ans;
}
int find2(long long v, int pos) {
  int l = pos, r = n;
  int ans = n + 1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (dp2[mid] <= v) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> a >> b >> T;
  string s;
  cin >> s;
  int t1 = 1 + (s[0] == 'w' ? b : 0);
  for (int i = 2; i <= n; i++) {
    long long t = 1;
    if (s[i - 1] == 'w') t += b;
    dp1[i] = dp1[i - 1] + t + a;
  }
  for (int i = n; i >= 2; i--) {
    long long t = 1;
    if (s[i - 1] == 'w') t += b;
    dp2[i] = dp2[i + 1] + t + a;
  }
  int ans = 0;
  if (t1 <= T) ans = 1;
  for (int i = 2; i <= n; i++) {
    if (dp1[i] + t1 > T) break;
    long long rem = T - (dp1[i] + t1) - i * a;
    int pos = find2(rem, i + 1);
    ans = max(ans, i + n - pos + 1);
  }
  for (int i = n; i >= 2; i--) {
    if (dp2[i] + t1 > T) break;
    long long rem = T - (dp2[i] + t1) - (n - i + 2) * a;
    int pos = find1(rem, i - 1);
    ans = max(ans, n - i + 2 + pos - 1);
  }
  cout << ans << endl;
  return 0;
}
