from sys import stdin,stdout
nmbr = lambda: int(stdin.readline())
lst = lambda: list(map(int,stdin.readline().split()))
for _ in range(1):#nmbr()):
    n,swipe,rotate,t=lst()
    s=input()
    ans=0
    pre=[0]*n
    if s[0]=='w':pre[0]=rotate+1
    else:pre[0]=1
    for i in range(1,n):
        pre[i]=pre[i-1]+1+swipe
        if s[i]=='w':pre[i]+=rotate
        if pre[i]<=t:ans=max(ans,i+1)
    suf=[0]*(1+n)
    for i in range(n-1,-1,-1):
        suf[i]=suf[i+1]+1+swipe
        if s[i]=='w':suf[i]+=rotate
    # print(pre)
    # print(suf)
    for i in range(n):
        l=i+1;r=n-1
        while l<=r:
            mid=(l+r)>>1
            if (pre[i]+suf[mid]+min(i,n-mid)*swipe)<=t:r=mid-1
            else:l=mid+1
        # print(pre[i],suf[l],i,l,(pre[i]+suf[l]+min(i,n-l-1)*swipe),i+1+n-l)
        if (pre[i]+suf[l]+min(i,n-l)*swipe)<=t:ans=max(ans,i+1+n-l)
    print(ans)

# 10 2 3 32
# hhwwhwhwwh