#include <bits/stdc++.h>
using namespace std;
long long a, b, n;
long long previewOpp(string str, long long pos, long long t,
                     long long counter) {
  if (counter == n) {
    return counter;
  }
  if (str[pos] == 'w') {
    t -= b;
  }
  t--;
  if (t <= 0) {
    return counter;
  }
  counter++;
  return previewOpp(str, pos - 1, t - a, counter);
}
long long previewImage(string str, long long pos, long long t,
                       long long counter) {
  if (pos == n) {
    return counter;
  }
  if (str[pos] == 'w') {
    t -= b;
  }
  t--;
  if (t <= 0) {
    return counter;
  }
  counter++;
  return max(previewImage(str, pos + 1, t - a, counter),
             previewOpp(str, n - 1, t - (a * (pos + 1)), counter));
}
int main() {
  long long t;
  cin >> n >> a >> b >> t;
  string str;
  cin >> str;
  cout << previewImage(str, 0, t, 0);
  return 0;
}
