#! /usr/bin/env python3

def main():
    n, a, b, t = map(int, input().split())
    oris = input()

    def get_time(front, rear, count_rot):
        span = front - rear
        offset = min(front, -rear)
        return span, span * a + (span + 1) + offset * a + count_rot * b

    front = rear = span = count_rot = new_count_rot = time = 0
    has_one = False
    for i in range(0, -n, -1):
        if oris[i] == 'w':
            new_count_rot += 1
        new_span, new_time = get_time(front, i, new_count_rot)
        if new_time > t:
            break
        has_one = True
        span, time, rear, count_rot = new_span, new_time, i, new_count_rot
    if not has_one:
        return 0

    maxi = max_span = n - 1
    while front < maxi and rear <= 0 and span != max_span:
        front += 1
        if oris[front] == 'w':
            count_rot += 1

        while True:
            new_span, time = get_time(front, rear, count_rot)
            if time <= t:
                break
            if oris[rear] == 'w':
                count_rot -= 1
            rear += 1
            if rear > 0:
                return span + 1

        span = max(new_span, span)

    return span + 1

print(main())
