#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  t = 1;
  while (t--) {
    int n, a, b, T;
    cin >> n >> a >> b >> T;
    string str;
    cin >> str;
    vector<int> ar(n);
    ar[0] = ((str[0] == 'w') ? 1 + b : 1);
    for (int i = 1; i < n; i++) ar[i] = ((str[i] == 'w') ? 1 + a + b : 1 + a);
    if (ar[0] > T) {
      cout << 0 << endl;
      break;
    }
    int t1 = ar[0], j = n - 1, ans = 0;
    while (j > 0 && t1 + ar[j] <= T) {
      t1 += ar[j];
      j--;
    }
    j++;
    ans = max(ans, 1 + n - j);
    for (int i = 1; i < j; i++) {
      t1 += ar[i] + a;
      while (t1 > T && j != n) {
        t1 -= ar[j];
        j++;
        if (j == n) t1 -= i * a;
      }
      if (t1 <= T)
        ans = max(ans, (i + 1) + (n - j));
      else
        break;
    }
    t1 = 0;
    j = 0;
    while (j < n && t1 + ar[j] <= T) {
      t1 += ar[j];
      j++;
    }
    j--;
    ans = max(ans, j + 1);
    for (int i = n - 1; i > j; i--) {
      t1 += ar[i] + a;
      while (t1 > T && j != -1) {
        t1 -= ar[j];
        j--;
        if (j == -1) t1 -= (n - i) * a;
      }
      if (t1 <= T)
        ans = max(ans, (j + 1) + (n - i));
      else
        break;
    }
    cout << ans << endl;
  }
  return 0;
}
