#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:32000000")
using namespace std;
const long long mod = 1000000007;
const double eps = 1e-9;
const double pi = acos(-1.0);
const int inf = 0x0FFFFFFF;
const int N = 1111111;
const int M = 26;
const int nil = -1;
const int root = nil + 1;
inline bool read(int& val) { return scanf("%d", &val) != -1; }
inline bool read(long long& val) { return scanf("%I64d", &val) != -1; }
inline bool read(double& val) { return scanf("%lf", &val) != -1; }
inline bool read(char* val) { return scanf("%s", val) != -1; }
template <class T1, class T2>
inline bool read(T1& a, T2& b) {
  return read(a) && read(b);
}
template <class T1, class T2, class T3>
inline bool read(T1& a, T2& b, T3& c) {
  return read(a) && read(b) && read(c);
}
template <class T1, class T2, class T3, class T4>
inline bool read(T1& a, T2& b, T3& c, T4& d) {
  return read(a) && read(b) && read(c) && read(d);
}
template <class T1, class T2, class T3, class T4, class T5>
inline bool read(T1& a, T2& b, T3& c, T4& d, T5& e) {
  return read(a) && read(b) && read(c) && read(d) && read(e);
}
template <class T>
T gcd(T a, T b) {
  for (T r; b != 0; r = a % b, a = b, b = r)
    ;
  return a;
}
template <class T>
T gcd(T a, T b, T& x, T& y) {
  T xa = 1, xb = 0;
  T ya = 0, yb = 1;
  while (b != 0) {
    x = xa - a / b * xb;
    xa = xb;
    xb = x;
    y = ya - a / b * yb;
    ya = yb;
    yb = y;
    T r = a % b;
    a = b;
    b = r;
  }
  x = xa;
  y = ya;
  return a;
}
void add(long long& a, long long b, long long mod) {
  a += b;
  if (a >= mod) a -= mod;
  if (a < 0) a += mod;
}
void mul(long long& a, long long b, long long mod) { a = a * b % mod; }
long long pow(long long a, long long b, long long mod) {
  long long x = 1;
  for (; b != 0; b >>= 1, mul(a, a, mod))
    if (b & 1) mul(x, a, mod);
  return x;
}
long long rev(long long a, long long mod) {
  long long x, y;
  gcd(a, mod, x, y);
  while (x < 0) x += mod;
  while (x >= mod) x -= mod;
  return x;
}
long long china(long long r[], long long mod[], int n) {
  long long x = 0, m = 1;
  for (int i = 0, _ = (n); i < _; ++i) m *= mod[i];
  for (int i = 0, _ = (n); i < _; ++i) {
    int mi = m / mod[i];
    x += r[i] * rev(mi, mod[i]) * mi;
  }
  return x % m;
}
int cmp(double a, double b) {
  if (fabs(a - b) < eps) return 0;
  return a < b ? -1 : 1;
}
template <class T, class U>
int lower_bound(T f, int l, int r, U val) {
  while (l < r) {
    int m = (l + r) / 2;
    if (f(m) < val)
      l = m + 1;
    else
      r = m;
  }
  return l;
}
template <class T, class U>
int upper_bound(T f, int l, int r, U val) {
  return lower_bound(f, l, r, ++val);
}
char str[N];
int sum1[N];
int sum2[N];
int main() {
  int n, a, b, t;
  read(n, a, b, t);
  read(str);
  sum1[0] = (str[0] == 'w' ? b : 0) + 1;
  for (int i = 0, _ = (n); i < _; ++i) {
    sum1[i + 1] = sum1[i] + (str[i + 1] == 'w' ? b : 0) + 1;
  }
  for (int i = (n)-1; i >= 0; --i) {
    sum2[i] = sum2[i + 1] + (str[i] == 'w' ? b : 0) + 1;
  }
  if (sum1[n - 1] + (n - 1) * a <= t) {
    printf("%d\n", n);
  } else if (sum1[0] > t) {
    printf("%d\n", 0);
  } else {
    int ans = 0;
    int r, l;
    r = n - 1;
    l = n - 1;
    while (r >= 0 && sum1[r] + 2 * r * a > t) r--;
    while (r >= 0) {
      while (l >= 1 && sum1[r] + sum2[l] + 2 * r * a + (n - l) * a <= t) l--;
      l++;
      ans = max(ans, r + n - l + 1);
      r--;
    }
    r = n - 1;
    l = n - 1;
    while (r >= 0 && sum1[r] + r * a > t) r--;
    while (r >= 0) {
      while (l >= 1 && sum1[r] + sum2[l] + r * a + 2 * (n - l) * a <= t) l--;
      l++;
      ans = max(ans, r + n - l + 1);
      r--;
    }
    if (ans > n) ans = n;
    printf("%d\n", ans);
  }
  return 0;
}
