from sys import stdin,stdout
nmbr = lambda: int(stdin.readline())
lst = lambda: list(map(int,stdin.readline().split()))
for _ in range(1):#nmbr()):
    n,sw,turn,t=lst()
    s=list(input())
    ans=0
    a=[0]*n
    if s[0]=='w':a[0]=turn
    for i in range(1,n):
        if s[i]=='h':
            a[i]=a[i-1]+1
        else:a[i]=a[i-1]+1+turn
    for i in range(n):
        a[i]+=i*sw
    ans=n
    # print(a)
    for i in range(n):
        if a[i]>t:
            ans=i
            break
    print(ans)