//JDope
import java.util.*;
import java.io.*;
import java.math.*;
public class D{
public static void main(String[] omkar) throws Exception
{
   BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
   StringTokenizer st = new StringTokenizer(in.readLine());
   StringBuilder sb = new StringBuilder();
   int n = Integer.parseInt(st.nextToken());
   int a = Integer.parseInt(st.nextToken());
   int b = Integer.parseInt(st.nextToken());
   int t = Integer.parseInt(st.nextToken());
   st = new StringTokenizer(in.readLine());
   String s = st.nextToken();
   int[] arr = new int[n];
   for(int i = 0; i < n; i++)
   {
      if(s.charAt(i) == 'w')
      {
         arr[i] = 1+b;
      }
      else
      {
         arr[i] = 1;
      }
   }  
   t = t-arr[0];
   if(t < 0)
   {
      System.out.println("0");
      return;
   }
   TreeSet<Pair> rights = new TreeSet<Pair>();
   TreeSet<Pair> lefts = new TreeSet<Pair>();
   int[] l = new int[n];
   int[] r = new int[n];
   int sum1 = 0;
   int sum2 = 0;
   rights.add(new Pair(0, 0));
   lefts.add(new Pair(0, 0));
   for(int i = 1; i < n; i++)
   {
      sum1 = sum1 + a + arr[i];
      sum2 = sum2 + a + arr[n-i];
      rights.add(new Pair(sum1+a*i, i));
      lefts.add(new Pair(sum2+a*i, i));
      l[i] = sum2;
      r[i] = sum1;
   }
   int max = 0;
   Pair temp;
   int temp2;
   for(int i = 1; i < l.length; i++)
   {
      temp2 = t - l[i];
      if(temp2 >= 0)
      {
         temp = rights.floor(new Pair(temp2, n-1));
         max = Math.max(max, Math.min(i+temp.b, n-1));
      }
   }
   for(int i = 1; i < r.length; i++)
   {
      temp2 = t - r[i];
      if(temp2 >= 0)
      {
         temp = lefts.floor(new Pair(temp2, n-1));
         max = Math.max(max, Math.min(i+temp.b, n-1));
      }
   }
   System.out.println((1+max));
        }
 public static int[] readArr(int N, BufferedReader in, StringTokenizer st) throws Exception
      {
         int[] arr = new int[N];
         st = new StringTokenizer(in.readLine());
         for(int i=0; i < N; i++)
            arr[i] = Integer.parseInt(st.nextToken());
         return arr;
      }
      static class Pair implements Comparable<Pair> {
int a;
int b;
Pair(int a, int b) {
this.a = a;
this.b = b;
}
@Override
public boolean equals(Object other)
{
   return compareTo((Pair)(other)) == 0;
}
@Override 
public int hashCode()
{
   return a*1000000007+b;
}
@Override
public int compareTo(Pair other) {
if (a != other.a) {
return a - other.a;
} else {
return b - other.b;
}}}



}