
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Problem_04 {




    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        String[] l = input.nextLine().split(" ");
        int n = Integer.parseInt(l[0]);
        long a = Long.parseLong(l[1]);
        long b = Long.parseLong(l[2]);
        long T = Long.parseLong(l[3]);

        String s = input.nextLine();

        long[] left = new long[n];
        long[] right = new long[n];


        long t_0 = 1 + (s.charAt(0) == 'w' ? b : 0);

        if (T < t_0) {
            System.out.println("0");
            return;
        }
        if (T == t_0) {
            System.out.println("1");
            return;
        }



        int maxl = n-1;
        int maxr = n-1;
        {
            long t = t_0;
            left[0] = t_0;
            for (int i = 1; i < n; i++) {
                t+= 1 + a + (s.charAt(i) == 'w' ? b : 0);
                //right
                right[i] = t;
                if (t > T) {
                    maxr = i - 1;
                    break;
                }
            }
        }
        {
            long t = t_0;
            right[0] = t_0;
            for (int i = 1; i < n; i++) {
                t+= 1 + a + (s.charAt(n-i) == 'w' ? b : 0);
                //left
                left[i] = t;
                if (t > T) {
                    maxl = i - 1;
                    break;
                }
            }
        }


        int max = Integer.max(maxl + 1, maxr + 1);
        if (max < n) {
            //left to right
            {
                int j = 1;
                long t = left[maxl] + a*maxl;
                for (int i = maxl - 1; i > 0; i--) {
                    t -= left[i+1] - left[i] - a;
                    while (t<=T) {
                        t +=right[j] - right[j-1];
                        j++;
                    }
                    max = Integer.max(max, i + j);
                }
            }

        }

        System.out.println(max);
    }

}
