#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  return (b) == 0 ? (a) : gcd((b), ((a) % (b)));
}
template <class T>
inline T lcm(T a, T b) {
  return ((a) / gcd((a), (b)) * (b));
}
template <class T>
inline T BigMod(T Base, T power, T M = 1000000007) {
  if (power == 0) return 1;
  if (power & 1)
    return ((Base % M) * (BigMod(Base, power - 1, M) % M)) % M;
  else {
    T y = BigMod(Base, power / 2, M) % M;
    return (y * y) % M;
  }
}
template <class T>
inline T ModInv(T A, T M = 1000000007) {
  return BigMod(A, M - 2, M);
}
int fx[] = {-1, +0, +1, +0, +1, +1, -1, -1, +0};
int fy[] = {+0, -1, +0, +1, +1, -1, +1, -1, +0};
int day[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
long long arr[500005], bc[500005], fr[500005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, a, b, t;
  cin >> n >> a >> b >> t;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (i) {
      arr[i] += a;
      if (s[i] == 'w') arr[i] += b;
    } else {
      if (s[i] == 'w') arr[i] += b;
    }
    arr[i]++;
  }
  long long mx = 0, sp = 0;
  fr[0] = arr[0];
  for (int i = 1; i < n; i++) {
    fr[i] += fr[i - 1] + arr[i];
  }
  for (int i = n - 1; i >= 0; i--) {
    bc[i] += bc[i + 1] + arr[i];
  }
  long long low = 0, high = n, mid;
  while (low <= high) {
    mid = (low + high) >> 1;
    long long res = 1e17;
    for (int i = 0; i < mid; i++) {
      long long res1 = 0;
      res1 += fr[mid - i - 1] + bc[n - i];
      res1 += min(i * a, (mid - i - 1) * a);
      res = min(res1, res);
    }
    if (res <= t) {
      low = mid + 1;
      mx = max(mx, mid);
    } else
      high = mid - 1;
  }
  cout << mx;
  return 0;
}
