#include <bits/stdc++.h>
using namespace std;
int getInt() {
  int x;
  scanf("%d", &x);
  return x;
}
long long getLongLong() {
  long long x;
  scanf("%I64d", &x);
  return x;
}
double getDouble() {
  double x;
  scanf("%lf", &x);
  return x;
}
char getChar() {
  char x;
  scanf("%c", &x);
  return x;
}
template <typename t>
t abs(t a) {
  if (a >= 0) return a;
  return -a;
}
struct dual {
  int a, b;
  bool const operator<(const dual &x) const {
    if (a == x.a) return b > x.b;
    return a < x.a;
  }
};
struct triple {
  int a, b, c;
  bool const operator<(const triple &x) const {
    if (c == x.c) {
      if (a == x.a) return b > x.b;
      return a < x.a;
    }
    return c < x.c;
  }
};
vector<string> split(const string &s, char c) {
  vector<string> v;
  stringstream second(s);
  string x;
  while (getline(second, x, c)) v.emplace_back(x);
  return move(v);
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << "  ";
  err(++it, args...);
}
void FastIO() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
char s[512345];
int fr[512345] = {0}, bk[512345] = {0};
int n, a, b, t;
int cl(int l, int r) {
  if (l >= r) return 0;
  int tm = fr[l] + bk[r] + min(l, n - r) * a - 1 - ((s[0] == 'w') ? a : 0);
  if (tm <= t) return l + (n - r) + 1;
  return 0;
}
int main() {
  scanf("%d%d%d%d", &n, &a, &b, &t);
  scanf("%s", s);
  int ans = 0;
  fr[0] = bk[0] = 1;
  if (s[0] == 'w') fr[0] = bk[0] = 1 + b;
  int r, st, en, itr = 0;
  if (t == 0) {
    puts("1");
    return 0;
  }
  if (t >= fr[0]) ans++;
  for (int i = 1; i < n; i++) {
    fr[i] = fr[i - 1] + 1 + a;
    if (s[i] == 'w') fr[i] += b;
    if (t >= fr[i]) ans = max(ans, i + 1);
  }
  if (fr[n - 1] <= t) goto skip;
  bk[n - 1] = bk[0] + 1 + a;
  if (s[n - 1] == 'w') bk[n - 1] += b;
  if (t >= bk[n - 1]) ans = max(ans, 2);
  for (int i = n - 2; i > 0; i--) {
    bk[i] = bk[i + 1] + 1 + a;
    if (s[i] == 'w') bk[i] += b;
    if (t >= bk[i]) ans = max(ans, n - i + 1);
  }
  for (int l = 1; l < n - 1; l++) {
    st = l, en = n, itr = 0;
    while (st < en) {
      r = (st + en) / 2;
      int x = cl(l, r);
      if (x) {
        en = r;
      } else
        st = r;
      ans = max(ans, x);
      if (ans == 6) {
        vector<string> _v = split("l, r, t", ',');
        err(_v.begin(), l, r, t);
        puts("");
      };
      if (itr++ > 100) break;
    }
  }
skip:;
  cout << ans << endl;
  return 0;
}
