n,a,b,t=map(int,raw_input().split())
def go(v):
  i,s=0,-a
  while i<n and s+a+v[i]<=t:
    s+=a+v[i]
    i+=1
  j=n
  r=0
  d=t-s
  s=0
  while i:
    r=max(r,i+n-j)
    i-=1
    d+=v[i]+(a if i>1 else 0)
    while j>0 and s+a+v[j-1]<d:
      j-=1
      s+=a+v[j]
  return min(n,r)
c=[b+1 if 'w'==x else 1 for x in raw_input()]
print max(go(c),go(c[:1]+c[n-1:0:-1]))
