var arr = readline().split(" ", 4).map(Number);
var n = arr[0], a = arr[1], b = arr[2], T = arr[3];
var str = readline();

var photoCount = 0, useTime = 0, maxPhotoCount;
if (str[0] === "w") {
    useTime += b;
}
++useTime;
if (useTime > T) {
    print(0);
} else {
    ++photoCount;
    maxPhotoCount = 1;

    for (var i = 1; i < n; ++i) {
        useTime += a + 1;
        if (str[i] === "w") {
            useTime += b;
        }
        if (useTime <= T) {
            ++photoCount;
        } else {
            break;
        }
        var photoOut = 0;
        if ((i + 1) * a + 1 <= T - useTime) {
            var timeOut = T - useTime - i * a;
            for (var j = n - 1; j > i; --j) {
                timeOut -= a + 1;
                if (str[j] === "w") {
                    timeOut -= b;
                }
                if (timeOut >= 0) {
                    ++photoOut;
                } else {
                    break;
                }
            }
        }
        maxPhotoCount = Math.max(maxPhotoCount, photoCount + photoOut);
        if (maxPhotoCount === n) {
            break;
        }
    }
    print(maxPhotoCount);
}