import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Swatantra
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int n = in.nextInt();
            int a = in.nextInt();
            int b = in.nextInt();
            int t = in.nextInt();

            String s = in.next();
            int pic1 = 0, pic2 = 0, pic3 = 0, pic4 = 0;


            int i = 0;
            int total = 1;
            if (s.charAt(0) == 'w')
                total += b;
            if (total <= t) {
                pic1++;

            }
            if (n == 1) {
                out.println(pic1);
                return;
            }
            for (i = 1; i < n; i++) {
                int add = 1 + a;
                if (s.charAt(i) == 'w') {
                    add += b;
                }
                if (total + add <= t) {
                    total += add;
                    pic1++;
                } else {
                    break;
                }
            }


            total = 1;
            if (s.charAt(0) == 'w')
                total += b;
            if (total <= t) {
                pic2++;

            }
            for (i = n - 1; i >= 1; i--) {
                int add = 1 + a;
                if (s.charAt(i) == 'w') {
                    add += b;
                }
                if (total + add <= t) {
                    total += add;
                    pic2++;
                } else {
                    break;
                }
            }

            int p1, p2;
            int flag = 0;

            total = 1;
            if (s.charAt(0) == 'w')
                total += b;
            if (total <= t) {
                pic3++;

            }

            int fc = 0;
            for (p1 = 1, p2 = n - 1; p1 != p2; ) {
                int add = 1 + a;
                int first = add;
                int second = add;


                if (s.charAt(p1) == 'w')
                    first += b;

                if (s.charAt(p2) == 'w')
                    second += b;


                if (flag == 1) {
                    first += a;
                }
                if (flag == 0) {
                    second += fc * a;

                }
                if (total + first <= total + second) {
                    //out.println("First is="+(total+first));
                    // out.println("Second is="+(total+second));
                    if (total + first <= t) {
                        total += first;
                        fc++;
                        pic3++;
                        p1++;

                        //out.println("p1 is now="+p1);
                        // out.println("pic3 is now="+pic3);
                        // out.println("pic3 is now="+pic3);
                    } else {
                        break;
                    }
                } else {
                    if (total + second <= t) {
                        total += second;
                        fc++;
                        flag = 1;
                        pic3++;
                        p2--;
                        //out.println("p2 is now="+p2);
                        //out.println("pic3 is now="+pic3);
                    } else {
                        break;
                    }

                }

            }


            flag = 0;

            total = 1;
            if (s.charAt(0) == 'w')
                total += b;
            if (total <= t) {
                pic4++;

            }

            int rc = 0;
            for (p1 = n - 1, p2 = 1; p1 != p2; ) {

                int add = 1 + a;


                int first = add;
                int second = add;


                if (s.charAt(p1) == 'w')
                    first += b;

                if (s.charAt(p2) == 'w')
                    second += b;

                if (flag == 1) {
                    first += a;
                }
                if (flag == 0) {
                    second += rc * a;

                }
                if (total + first <= total + second) {
                    if (total + first <= t) {
                        total += first;
                        rc++;
                        pic4++;
                        p1--;
                        //out.println("p1 is now="+p1);
                        // out.println("pic4 is now="+pic4);
                    } else {
                        break;
                    }
                } else {
                    if (total + second <= t) {
                        total += second;
                        rc++;
                        flag = 1;
                        pic4++;
                        p2++;

                        //out.println("p2 is now="+p2);
                        //out.println("pic4 is now="+pic4);
                    } else {
                        break;
                    }

                }

            }
            // out.println(pic1);
            // out.println(pic2);
            //  out.println(pic3);
            // out.println(pic4);
            out.println(Math.max(Math.max(pic1, pic2), Math.max(pic3, pic4)));
        }

    }
}

