def w_count(st, T, a):
  rp = 0
  lp = -1
  lt =0
  rt = 0
  while rt<T and (rp)<len(st):
    rt += st[rp]
    if rt >= T:break
    rt+=1
    rp+=1
    if rt >= T:break
    rt += a
  while lt <T and (-1-lp)<len(st):
    lt += st[lp]
    if lt >=T:break
    lt+=1
    lp -=1
    if lt>=T:break
    lt+=a
  if -1 - lp > rp:
    return 'left'
  else:
    return 'right'
    

n,a,b,T  = [int(i) for i in input().split(' ')]
photos = [{'w':b,'h':0}[i] for i in input()] # w means + b seconds
cur = 0
rp = None
while T:
  if len(photos) == n or len(photos) == 1:
    T -= photos[0]
    photos.pop()
  elif(photos[-1] == 0):
    photos.pop()
  elif photos[0] == 0:
    photos = photos[1:]
  else:
    T -= b
    if rp == None: rp = w_count(photos, T, a)
    if rp == 'left':
      photos.pop()
    else:
      photos.pop(0)
  if T <= 0: break
  T -= 1
  cur += 1
  if T <= 0: break
  T -= a
  if cur == n or photos == []:
    break
print(cur)