#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MAX = 1e5 + 5;
long long N, M;
long long MOD = 1e9 + 7;
long long fexpo(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b % 2) ans = (ans * a) % MOD;
    b /= 2;
    a = (a * a) % MOD;
  }
  return ans;
}
vector<long long> get_vis_time(string str, long long a, long long b) {
  vector<long long> v;
  long long t = 0;
  for (long long i = 0; i < str.size(); i++) {
    t += 1;
    if (i > 0) t += a;
    if (str[i] == 'w') t += b;
    v.push_back(t);
  }
  return v;
}
long long get_simple_max(vector<long long> &v, long long T) {
  long long n = v.size();
  long long i = 0;
  for (; i < n; i++) {
    if (v[i] > T) break;
  }
  return i;
}
long long get_max_rev(vector<long long> &v, long long hi, long long T) {
  long long lo = 0, mid, ans = 0;
  while (lo <= hi) {
    mid = (hi + lo) / 2;
    if (v[mid] <= T) {
      ans = mid + 1;
      lo = mid + 1;
    } else
      hi = mid - 1;
  }
  return ans;
}
long long get_two_sided_max(vector<long long> &v1, vector<long long> &v2,
                            long long T, long long a) {
  long long mx = 0;
  for (long long i = 0; i < v1.size() - 1; i++) {
    if (v1[i] > T) {
      mx = max(mx, i);
      break;
    }
    if (v1[i] + (i + 1) * a > T) {
      mx = max(mx, i + 1);
      break;
    }
    mx = max(mx,
             get_max_rev(v2, v1.size() - 1 - (i + 1), T - v1[i] - (i + 1) * a) +
                 i + 1);
  }
  return mx;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long n, a, b, T;
  cin >> n >> a >> b >> T;
  string str;
  vector<long long> vis_t1;
  cin >> str;
  vis_t1 = get_vis_time(str, a, b);
  reverse(str.begin(), str.end());
  vector<long long> vis_t2 = get_vis_time(str, a, b);
  reverse(str.begin(), str.end());
  string split_string = str.substr(1);
  split_string += str[0];
  vector<long long> vis_t4 = get_vis_time(split_string, a, b);
  reverse(str.begin() + 1, str.end());
  vector<long long> vis_t3 = get_vis_time(str, a, b);
  long long ans = max(get_simple_max(vis_t1, T), get_simple_max(vis_t3, T));
  ans = max(get_two_sided_max(vis_t1, vis_t2, T, a),
            get_two_sided_max(vis_t3, vis_t4, T, a));
  cout << ans;
}
