#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, n, t, i, j;
  cin >> n >> a >> b >> t;
  char str[n + 100];
  cin >> str;
  int st[n + 100], end[n + 100];
  int max = 0, maxst = 0, maxend = n;
  st[0] = (str[0] == 'w') ? b + 1 : 1;
  for (i = 1; i < n; i++) {
    st[i] = st[i - 1] + ((str[i] == 'w') ? a + b + 1 : a + 1);
    if (st[i] <= t)
      maxst = i;
    else
      break;
  }
  end[n] = st[0];
  for (i = n - 1; i > 0; i--) {
    end[i] = end[i + 1] + ((str[i] == 'w') ? a + b + 1 : a + 1);
    if (end[i] <= t)
      maxend = i;
    else
      break;
  }
  max = (maxst + 1 > n + 1 - maxend) ? maxst + 1 : n + 1 - maxend;
  i = 1;
  j = maxend;
  while (i <= maxst && j < n) {
    int sol = end[j] + st[i] + (i * a) - st[0];
    if (sol > t) {
      j++;
    } else {
      max = (max > (i + (n - j) + 1) ? max : (i + (n - j) + 1));
      i++;
    }
  }
  i = maxst;
  j = n - 1;
  while (i > 0 && j > maxend) {
    int sol = end[j] + st[i] + ((n - j + 1) * a) - st[0];
    if (sol > t) {
      i--;
    } else {
      max = (max > (i + (n - j) + 1) ? max : (i + (n - j) + 1));
      j--;
    }
  }
  if (max < n)
    cout << max;
  else
    cout << n;
}
