#include <bits/stdc++.h>

#define left nadnlassad
#define right asdaslknd
#define y1 kjdajasjdsas

#define pb push_back
#define mp make_pair

#define f first
#define s second

#define ll long long
#define ld long double
#define ull unsigned ll

#define _hash pair<ll, ull>
#define pii pair<int, int>
#define prr pair<pii, pii>

#define sqr(x) (x * 1LL * x)

#define vec vector<int>
#define sz(v) int(v.size())
#define all(v) v.begin(), v.end()
#define upper(v, x) (upper_bound(all(v), x) - v.begin())
#define lower(v, x) (lower_bound(all(v), x) - v.begin())
#define iter set<int>::iterator
#define _bits(x) __builtin_popcount(x)
#define int ll

using namespace std;


const int nx[8] = {2, -2, -2, 2, 1, 1, -1, -1};
const int ny[8] = {1, 1, -1, -1, 2, -2, -2, 2};

const ll LINF = (ll) 2e18;
const int INF = 1e9 + 7;

const int N = 1e6 + 100;
const int MAXN = 5e7 + 50;
const double EPS = 1e-9, PI = 2 * acos(0.0);
int n, a, b, T, h, res;
string s;
int cost[N];

main() {
   #define fn ""
   #ifdef sony
      freopen("input.txt", "r", stdin);
      //freopen("output1.txt", "w", stdout);
   #else
      //freopen(fn".in", "r", stdin);
      //freopen(fn".out", "w", stdout);
   #endif // sony
   srand(time(NULL));
   cin >> n >> a >> b >> T >> s;
   cost[n - 1] = (s[n - 1] == 'w' ? b : 0) + 1;
   for(int i = n - 2; i >= 0; i--)
      cost[i] = cost[i + 1] + (s[i] == 'w' ? b : 0) + 1 + a;
   h = T;
   res = 0;
   int l = 0;
   for(int i = 0; i < n; i++) {
      if(s[i] == 'w')
         h -= b;
      h--;
      if(h < 0) break;
      l = max(l, i + 1);
      while(l < n && cost[l] > h - (i + 1) * 1ll * a)
         l++;
      res = max(res, i + 1 + n - l);
      h -= a;
   }
   cost[0] = (s[0] == 'w' ? b : 0);
   for(int i = 1; i < n; i++)
      cost[i] = cost[i - 1] + (s[i] == 'w' ? b : 0) + 1 + a;
   h = T - 1 - (s[0] == 'w' ? b : 0) - a;
   l = n - 1;
   for(int i = n - 1; i >= 0; i--) {
      if(s[i] == 'w')
         h -= b;
      h--;
      if(h < 0) break;
      l = min(l, i - 1);
      while(l >= 0 && cost[l] > h - (n - i) * 1ll * a)
         l--;
      res = max(res, n - i + l + 1);
      h -= a;
   }
   cout << res;
   return 0;
}