#include <bits/stdc++.h>
using namespace std;
inline bool checkBit(long long n, int i) { return n & (1LL << i); }
inline long long setBit(long long n, int i) {
  return n | (1LL << i);
  ;
}
inline long long resetBit(long long n, int i) { return n & (~(1LL << i)); }
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
int l[501000], r[501000];
int main() {
  ios_base::sync_with_stdio(0);
  int n, a, b, T;
  cin >> n >> a >> b >> T;
  string s;
  cin >> s;
  int time = 1 + b * (s[0] == 'w');
  ;
  if (T < 0) {
    cout << 0;
    return 0;
  }
  int ans = 0;
  for (int i = 1, tempTime = time; i < n; ++i) {
    tempTime += 1 + a + b * (s[i] == 'w');
    r[i] = tempTime;
    ;
  }
  for (int i = n - 1, j = 1, tempTime = time; i >= 0; --i, ++j) {
    tempTime += 1 + a + b * (s[i] == 'w');
    l[j] = tempTime;
    ;
  }
  for (int i = 1; i < n; ++i) {
    int tempTime = r[i], time = T;
    time -= tempTime;
    ;
    if (time < 0) break;
    int temp = i + 1;
    ;
    time -= i * a;
    temp += max(0, (int)(upper_bound(l, l + n, time) - l) - 1);
    ans = max(temp, ans);
  }
  for (int i = 1; i < n; ++i) {
    int tempTime = l[i], time = T;
    time -= tempTime;
    ;
    if (time < 0) break;
    int temp = i + 1;
    time -= i * a;
    ;
    temp += max(0, (int)(upper_bound(r, r + n, time) - r) - 1);
    ans = max(temp, ans);
  }
  cout << min(ans, n);
  return 0;
}
