# -*- coding: utf-8 -*-

import bisect

def check(l, r):
    if r == 0 and L[l] + l + 1 <= T:
        return True
    if l == 0 and R[r] + r + 1 <= T:
        return True
    if 2 * L[l] - b * s[-l] + R[r] - b * s[0] + l + r + 1 <= T:
        return True
    if L[l] + 2 * R[r] - b * s[r] - b * s[0] + l + r + 1 <= T:
        return True
    return False


n, a, b, T = map(int, input().split())
t_s = input()
s = [t_s[i] == "w" for i in range(n)]

L = [0] * n
R = [0] * n
L[0] = b * s[0]
R[0] = b * s[0]
for i in range(1, n):
    L[i] += a + b * s[-i] + L[i - 1]
    R[i] += a + b * s[i] + R[i - 1]

r = 0
ans = 0
for l in range(n)[::-1]:
    while l + r < n and check(l, r):
        ans = max(ans, l + r + 1)
        r += 1

print(ans)
