#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int numH[500001];
int n, a, b, t;
int getCost1(int x, int y) {
  int flipCostX = b * numH[x];
  int shiftCostX = (x == 0) ? 0 : (y == 0) ? a * (x - 1) : a * (2 * (x - 1));
  int viewCostX = x;
  int costX = flipCostX + shiftCostX + viewCostX;
  int flipCostY = b * (numH[n] - numH[n - y]);
  int shiftCostY = (y == 0) ? 0 : a * y;
  int viewCostY = y;
  int costY = flipCostY + shiftCostY + viewCostY;
  return costX + costY;
}
int getCost2(int x, int y) {
  int flipCostX = b * numH[x];
  int shiftCostX = (x == 0) ? 0 : a * x;
  int viewCostX = x;
  int costX = flipCostX + shiftCostX + viewCostX;
  int flipCostY = b * (numH[n] - numH[n - y]);
  int shiftCostY = (y == 0) ? 0 : (x == 0) ? a * y : a * (2 * y - 1);
  int viewCostY = y;
  int costY = flipCostY + shiftCostY + viewCostY;
  return costX + costY;
}
int main() {
  string p;
  cin >> n >> a >> b >> t >> p;
  for (int i = 1; i <= n; ++i) {
    numH[i] = numH[i - 1];
    if (p[i - 1] == 'w') {
      ++numH[i];
    }
  }
  int ans = -1;
  for (int x = 0; x <= n; ++x) {
    int low = 0;
    int high = n - x;
    int cost = 2e9;
    while (low < high) {
      int y = (low + high + 1) / 2;
      cost = getCost1(x, y);
      if (cost <= t) {
        low = y;
      } else {
        high = y - 1;
      }
    }
    cost = getCost1(x, low);
    if (cost <= t) {
      ans = max(ans, x + low);
    }
  }
  for (int y = 0; y <= n; ++y) {
    int low = 0;
    int high = n - y;
    int cost = 2e9;
    while (low < high) {
      int x = (low + high + 1) / 2;
      cost = getCost2(x, y);
      if (cost <= t) {
        low = x;
      } else {
        high = x - 1;
      }
    }
    cost = getCost2(low, y);
    if (cost <= t) {
      ans = max(ans, y + low);
    }
  }
  cout << ans << endl;
  return 0;
}
