# 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
    if n==1 and dp[0]>T:
        output = 0
    elif n==0 and dp[0] <= T:
        output = 1
    else:
        point1,point2=1,n-1
        if dp[0] <= T:
            maxcount,maxall = 1,dp[0]
        else:
            maxcount,maxall = 0,0
        while True:
            #print point1, point2
            if  (point1==n or maxall+dp[point1]>T) and point2==0 or (maxall+dp[point2]>T):
                break
            elif point1<=n-1 and point2>0 and maxall+dp[point1]<=T and maxall+dp[point2]<=T:
                if dp[point1]<=dp[point2]:
                    maxall+=dp[point1]
                    point1+=1
                    maxcount+=1
                else:
                    maxall+=dp[point2]
                    point2-=1
                    maxcount+=1
            elif point1<=n-1 and  maxall+dp[point1]<=T :
                maxall+=dp[point1]
                point1+=1
                maxcount+=1
            elif point2>0 and  maxall+dp[point2]<=T :
                maxall+=dp[point2]
                point2-=1
                maxcount+=1
            if maxcount==n:
                break


        


        #print dp
        output = maxcount
    #-------------------------------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()

