n,a,b,t=map(int, input().split(" "))
ch=input()
i=0
s=0
k=0
while (k<n):
    if ch[i]=='w':
        s=s+b
        if s>t:
            break
    s=s+1
    if s>t:
            break
    k=k+1
    s=s+a
    if s>t:
            break
    i=i+1
print(k)