print(main.apply(0, readNums()));
function main(n, a, b, T) {
    var imgs = readline();
    var fwdTimes = [0], revTimes = [0];
    T -= 1 + (imgs[0] == 'w' ? b : 0);
    if (T < 0) return 0;
    var fwd = 1, rev = 1;
    for (var i = 1; i < n; i++) {
        fwdTimes[i] = fwdTimes[i - 1] + 1 + a + (imgs[i] == 'w' ? b : 0);
        if (fwdTimes[i] <= T) fwd++;
        revTimes[i] = revTimes[i - 1] + 1 + a + (imgs[n - i] == 'w' ? b : 0);
        if (revTimes[i] <= T) rev++;
    }
    if (rev > fwd) {
        var tmp = fwdTimes;
        fwdTimes = revTimes;
        revTimes = tmp;
    }
    var start = 0, end = Math.max(fwd, rev);
    if (end <= 0) return 0;
    if (end >= n) return n;
    var current = end;
    while (end - 1 > start) {
        var mid = Math.floor((start + end) / 2);
        var remain = T - fwdTimes[mid] - mid * a;
        var rev = 0;
        if (remain > 0) {
            for (var i = 1; i < n && revTimes[i] <= remain; i++) {
                rev = i;
            }
        }
        rev += mid + 1;
        if (rev > current) {
            end = mid + 1;
            current = rev;
        } else {
            start = mid;
        }
    }
    return Math.min(current, n);
}
function readNums() {
    return readline().split(' ').map(v => v - 0);
}
