import java.util.*;

public class Task650B {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in); 
        int n = s.nextInt();
        int a = s.nextInt();
        int b = s.nextInt();
        int T = s.nextInt();
        String p = s.next();
        int[] wf = new int[n];
        int[] wb = new int[n];
        int pf = 0;
        int pb = 0;
        for(int i = 0; i < n; i++) {
            int slide = (i == 0 ? 0 : a);
            wf[i] = p.charAt(i) == 'w' ? pf + b + slide + 1: pf + slide + 1;
            wb[i] = p.charAt(n - i - 1) == 'w' ? pb + b + a + 1: pb + a + 1;
            pf = wf[i];
            pb  = wb[i];
        }
        int N1, N2, N;
        N = 0;
        //System.out.println(Arrays.toString(wf));
        //System.out.println(Arrays.toString(wb));
        N1 = Arrays.binarySearch(wf, T);
        if(N1 < 0)
            N1 = -N1 - 2;
        if(N1 == n - 1) {
            System.out.println(n);
            return;
        }
        //System.out.println("N1 = " + N1);
        for(int i = N1; i >= 0; i--) {
            int T1 = T - wf[i] - a * i;
            if(T1 <= 0)
                continue;
            N2 = Arrays.binarySearch(wb, T1);
            N2 = (N2 < 0 ? -N2 - 2 : N2);
            N2 = (N2 < 0 ? 0 : (N2 >= n ? n - 1 : N2));
            //System.out.println("i = " + i + " T' = " + T1 + " N2 = " + N2);
            if(N < (i + 1) + (N2 + 1))
                N = i + 1 + N2 + 1;
        }
        System.out.println(N);
    }
}

