#include <bits/stdc++.h>
using namespace std;
int n, t;
long long z;
long long power(long long x, long long y) {
  long long res = 1;
  x = x % z;
  while (y > 0) {
    if (y & 1) res = (res * x) % z;
    y = y >> 1;
    x = (x * x) % z;
  }
  return res;
}
long long a, b;
string s;
bool is(long long val) {
  bool ans = false;
  long long t1 = 0;
  for (int i = 0; i < val; i++) {
    t1++;
    if (s[i] == 'w') {
      t1 += b;
    }
  }
  int p1 = val - 1;
  int p2 = n - 1;
  int pr = val, sf = 0;
  while (pr != 0) {
    int min = pr - 1 > sf ? sf : pr - 1;
    long long t2 = (min + val - 1) * a;
    if (t1 + t2 <= t) {
      ans = true;
      break;
    }
    int xx1 = 1, xx2 = 1;
    if (s[p1] == 'w') {
      xx1 += b;
    }
    if (s[p2] == 'w') {
      xx2 += b;
    }
    t1 -= xx1;
    t1 += xx2;
    p1--;
    p2--;
    pr--;
    sf++;
  }
  return ans;
}
int bs(int l1, int r1) {
  int l = l1, r = r1;
  int mid;
  while (r - l > 1) {
    mid = l + (r - l) / 2;
    if (is(mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  if (is(r)) {
    return r;
  }
  return l;
}
int main() {
  cin >> n >> a >> b >> t;
  cin >> s;
  int ans = bs(0, n);
  cout << ans << endl;
  return 0;
}
