#include <bits/stdc++.h>
using namespace std;
long long b_search(long long* a, long long x, int left, int right) {
  if (left < right) {
    int mid = (left + right + 1) / 2;
    if (a[mid] > x) {
      return (b_search(a, x, left, mid - 1));
    } else {
      return (b_search(a, x, mid, right));
    }
  } else {
    return left;
  }
}
void tp() {
  long long a[] = {1, 3, 5, 7, 9, 12, 45};
  for (int i = 0; i < 5; i++) {
    int temp = rand() % 30;
    cout << temp << " " << b_search(a, temp, 0, 6) << endl;
  }
}
int main() {
  int n, a, b, T;
  cin >> n >> a >> b >> T;
  string s;
  cin >> s;
  long long dx[n + 1], dy[n + 1];
  dx[0] = 0;
  dx[1] = (s[0] == 'w' ? b + 1 : 1);
  for (int i = 2; i <= n; i++) {
    if (s[i - 1] == 'w') {
      dx[i] = dx[i - 1] + a + b + 1;
    } else {
      dx[i] = dx[i - 1] + a + 1;
    }
  }
  dy[0] = 0;
  for (int i = 1; i <= n; i++) {
    if (s[n - i] == 'w') {
      dy[i] = dy[i - 1] + a + b + 1;
    } else {
      dy[i] = dy[i - 1] + a + 1;
    }
  }
  int x, y, ans = 0;
  for (int i = 1; i <= n; i++) {
    if (T - dx[i] - a * (i - 1) < 0) {
      break;
    }
    y = b_search(dy, T - dx[i] - a * (i - 1), 0, n - i);
    ans = max(ans, i + y);
  }
  for (int i = 0; i <= n; i++) {
    if (T - dy[i] - a * i < 0) {
      break;
    }
    x = b_search(dx, T - dy[i] - a * i, 0, n - i);
    ans = max(ans, i + x);
  }
  cout << ans << endl;
  return 0;
}
