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

function calc() {
    var maxPhotoCount = 1, left = [], right = [], i, tmp;
    left[0] = right[0] = 0;
    for (i = 1; i < n; ++i) {
        tmp = left[i - 1] + a + (str[i] === "w" ? b : 0) + 1;
        if (tmp + useTime > T) {
            break;
        }
        left[i] = tmp;
    }
    maxPhotoCount = Math.max(maxPhotoCount, left.length);
    if (maxPhotoCount === n) {
        return n;
    }
    for (i = 1; i < n; ++i) {
        tmp = right[i - 1] + a + (str[n - i] === "w" ? b : 0) + 1;
        if (tmp + useTime > T) {
            break;
        }
        right[i] = tmp;
    }
    maxPhotoCount = Math.max(maxPhotoCount, right.length);
    if (maxPhotoCount === n) {
        return n;
    }

    var time, beg, end, mid;
    end = right.length - 1;
    for (i  = 1; i < left.length; ++i) {
        time = T - useTime - left[i] - i * a;
        if (right[1] > time) {
            break;
        }
        beg = 1;
        while (true) {
            if (right[end] <= time) {
                break;
            }
            mid = Math.ceil((beg + end) / 2);
            if (right[mid] <= time) {
                beg = mid;
            } else {
                end = mid - 1;
            }
        }
        
        maxPhotoCount = Math.max(maxPhotoCount, i + end + 1);
    }
    end = left.length - 1;
    for (i  = 1; i < right.length; ++i) {
        time = T - useTime - right[i] - i * a;
        if (left[1] > time) {
            break;
        }
        beg = 1;
        while (true) {
            if (left[end] <= time) {
                break;
            }
            mid = Math.ceil((beg + end) / 2);
            if (left[mid] <= time) {
                beg = mid;
            } else {
                end = mid - 1;
            }
        }
        maxPhotoCount = Math.max(maxPhotoCount, i + end + 1);
    }
    return maxPhotoCount;
}

var useTime = 1 + (str[0] === "w" ? b : 0);
if (useTime > T) {
    print(0);
} else {
    print(calc());
}