#include <bits/stdc++.h>
using namespace std;
long long n, m, x, y, z, w, h, z1, z2, q, k, d, t, ans, l, lx, r, rx, a, b,
    mod = 1e9 + 7;
string s;
int main() {
  cin >> n >> a >> b >> t >> s;
  for (int i = 0; i < n; i++) {
    x++;
    if (s[i] == 'w') x += b;
    if (x > t) {
      x -= b * (s[i] == 'w') + 1 + a * (i > 0);
      break;
    }
    y++;
    if (i != n - 1) x += a;
  }
  r = y;
  rx = x;
  ans = max(ans, y);
  if (ans >= n) return cout << n, 0;
  x = 1;
  y = 0;
  if (s[0] == 'w') x += b;
  if (t > x) {
    x += a;
    y = 1;
    for (int i = n - 1; i > 0; i--) {
      x++;
      if (s[i] == 'w') x += b;
      if (x > t) {
        x -= b * (s[i] == 'w') + 1 + a * (i > 0);
        break;
      }
      y++;
      if (i != 1) x += a;
    }
  } else
    x = 0;
  ans = max(ans, y);
  lx = x;
  l = y;
  x += y * a;
  l--;
  if (ans >= n) return cout << n, 0;
  if (l >= 0) {
    for (int i = 1; i < n; i++) {
      x++;
      if (s[i] == 'w') x += b;
      while (x > t && l > 0) {
        x--;
        x -= 2 * a;
        if (s[n - l] == 'w') x -= b;
        y--;
        l--;
      }
      if (x > t) break;
      y++;
      x += a;
      ans = max(ans, y);
    }
    if (ans >= n) return cout << n, 0;
  }
  x = rx;
  y = r;
  r--;
  x += y * a;
  if (r >= 0) {
    for (int i = n - 1; i > 0; i--) {
      x++;
      if (s[i] == 'w') x += b;
      while (x > t && r > 0) {
        x--;
        x -= 2 * a;
        if (s[r] == 'w') x -= b;
        y--;
        r--;
      }
      if (x > t) break;
      y++;
      x += a;
      ans = max(ans, y);
    }
    if (ans >= n) return cout << n, 0;
  }
  cout << ans;
  return 0;
}
