n, a, b, t = map(int, input().split())
orient = input()

right = [0] * n
left = [0] * n

for i in range(1, n):
    right[i] = right[i - 1] + a + 1
    if orient[i] == 'w':
        right[i] += b
for i in range(-1, -n, -1):
    left[i] = left[i + 1] + a + 1
    if orient[i] == 'w':
        left[i] += b
max_ph = 0
t -= 1
if orient[0] == 'w':
    t -= b
if t >= 0:
    leftind = - n + 1
    for i in range(n // 2 + 1):
        rest = t - right[i] - a * i
        if rest >= 0:
            while left[leftind] > rest and leftind < 0:
                leftind += 1
            max_ph = max(max_ph, i - leftind + 1)
    rightind = n - 1
    for i in range(-1, -(n // 2 + 1)):
        rest = t - left[i] + a * i
        if rest >= 0:
            while right[rightind] > rest and rightind > 0:
                rightind -= 1
            max_ph = max(max_ph, rightind - i + 1)
print(min(max_ph, n))
