import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;

/**
 * Created by houseqwerty on 07.03.16.
 */

public class MainD {
    public static void main(String[] arg) throws IOException {
        Scanner br = new Scanner(System.in);
        int n = br.nextInt();
        int a = br.nextInt();
        int b = br.nextInt();
        long T = br.nextInt();
        long T1 =  T;

        String s = br.nextLine();
        long result=0;
        long result2 = 0;
         int i =0;
        if(!(b>T  && s.charAt(i) == 'w' ) || (T<=1 && s.charAt(i) == 'h' ) ) {
            do {
                if (s.charAt(i) == 'w') {
                    T -= b;
                } else T -= 1;
                T -= a;
                i++;
                result++;
            } while (T > 0 && i < n);

            i=1;
            T1= T1-1-b;
            result2++;
            do {

                if (s.charAt(s.length()-i) == 'w') {
                    T1 -= b;
                } else T1 -= 1;
                T1 -= a;
                i++;
                result2++;
            } while (T1 > 0 && i <= s.length());
            if(result>result2)
                result=result2;
        }

        System.out.println(result);




    }


    public static int check(int[]  array ){

        int result = 0;
        for (int i = 0; i < array.length-1; i++) {
            for (int j = i+1; j < array.length; j++) {
                if(array[i] < array[j])
                    result++;
            }
        }
        return result;
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public boolean ready() throws IOException {return br.ready();}


    }
}
