n, a, b, t = map(int, raw_input().split())
photo = raw_input()
dp1 = [0] * (n + 1)
dp2 = [0] * (n + 1)
dp1[0] = -a
dp2[-1] = -a
for i in range(len(photo)):
    dp1[i+1] = dp1[i] + a + 1
    if photo[i] == 'w':
        dp1[i+1] += b
for i in reversed(range(len(photo))):
    dp2[i] = dp2[i+1] + a + 1
    if photo[i] == 'w':
        dp2[i] += b

def bsearch(dp,l, v):
    r = len(dp)
    while l < r:
        m = (l + r)/2
        if dp[m] > v:
            l = m + 1
        else:
            r = m
    return r

ans = 0
for i in range(1, n + 1):
    if dp1[i] > t:
        break
    tmp = i
    time = dp1[i] + i * a - a
    if time < t:
        tmp += n - bsearch(dp2, i, t - time)
    else:
        tmp = i
    ans = max(ans, tmp)

print ans
