def bfs(a, l, h, v):
    mid = (h+l)/2

    if l > h:
        return -1

    if a[mid] <= v:
        if mid == 0:
            return mid

        if a[mid-1] > v:
            return mid

    if a[mid] < v:
        h = mid - 1
    else:
        l = mid + 1

    return bfs(a, l, h, v)

def main():
    n, a, b, t = [int(i) for i in raw_input().split()]
    orient = raw_input()

    left = 0
    right = n-1

    dpl = [t+1]*n
    dpr = [t+1]*n

    tl = 0
    while True:
        tl += 1
        if orient[left] == 'w':
            tl += b

        dpl[left] = tl

        if left == n-1 or tl >= t:
            break

        left += 1
        tl += a

    tr = 0
    while True:
        tr += 1
        if orient[right] == 'w':
            tr += b

        dpr[right] = tr

        if right == 0 or tr >= t:
            break

        right -= 1
        tr += a

    # print dpl
    # print dpr

    if dpl[-1] <= t:
        print n
        return

    max_count = -1
    for i in range(n-1, 0, -1):
        if dpr[i] > t:
            max_count = (n-1) - i
            break

    for i in range(n):
        count = 0
        t_left = t - dpl[i] - ((i+1)*a)

        r = bfs(dpr, 0, n-1, t_left)

        if r != -1:
            count = (i + 1) + ((n-1) - r + 1)

        # print "i:", i, " r: ", r, " count:", count
        max_count = max(count, max_count)

    print max_count
    return

main()
