# python2
import sys, threading, os.path
import collections, heapq, math,bisect
import string
sys.setrecursionlimit(10**6) # max depth of recursion
threading.stack_size(2**27)

def main():
    if os.path.exists('input.txt'):
        input = open('input.txt', 'r')
    else:
        input = sys.stdin
    #--------------------------------INPUT---------------------------------
    n,a,b,T = list(map(int, input.readline().split()))
    photos = str(input.readline())
    dp = [0]*(n)
    for i in range(n):
        if i!=0:
            dp[i]+=a
        if photos[i]=='w':
            dp[i]+=b
        dp[i]+=1
    maxright,rightcounter=0,0
    for i in range(n):
        if maxright+dp[i]<=T:
            maxright+=dp[i]
            rightcounter+=1
        else:
            break
    if dp[0]<=T:
        maxleft,leftcounter=dp[0],1
    else:
        maxleft,leftcounter=0,0
    for i in reversed(range(1,n)):
        if maxleft+dp[i]<=T:
            maxleft+=dp[i]
            leftcounter+=1
        else:
            break

    maxrightleft,rightleftcounter=maxright,rightcounter
    j = n-1
    for i in reversed(range(rightcounter)):
        maxrightleft-=dp[i]+2
        tempcounter= rightleftcounter
        tempcounter-=1
        while True:
            if j<=0 or maxrightleft+dp[j]+2>T:
                break
            tempcounter+=1
            maxrightleft+=dp[j]+2
            j-=1
        rightleftcounter = min(max(tempcounter,rightleftcounter),n)
        
    maxleftright,leftrightcounter=maxleft,leftcounter
    j = 1
    for i in range(leftcounter,n-1):
        maxleftright -= dp[i]+2
        tempcounter= leftrightcounter
        tempcounter-=1
        while True:
            if j==n or maxleftright+dp[j]+2>T:
                break
            tempcounter+=1
            maxleftright+=dp[j]+2
            j+=1
        leftrightcounter = min(max(tempcounter,leftrightcounter),n)
    '''
    print dp
    print maxright, rightcounter
    print maxleft, leftcounter
    print maxrightleft, rightleftcounter
    print maxleftright, leftrightcounter
    '''
    if n==1 and maxright>0:
        output = 1
    elif rightcounter==0 and leftcounter==0:
        output = 0
    else:
        output = max(rightcounter,leftcounter,rightleftcounter,leftrightcounter)
    #-------------------------------OUTPUT----------------------------------
    if os.path.exists('output.txt'):
        open('output.txt', 'w').writelines(str(output))
    else:
        sys.stdout.write(str(output))


threading.Thread(target=main).start()

