import java.io.BufferedWriter;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.*;

/**
 * @auther chao
 * @date 16/3/27
 */
public class CF0327 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a = in.nextInt();
        int b = in.nextInt();
        int T = in.nextInt();
        in.nextLine();
        char[] s = in.nextLine().toCharArray();
        int[] l = new int[n];

        int ans = 0;
        ans = gao(s,l,a,b,T);
        for (int i = 1; i < n; i++) {
            int j = n-i;
            if (i < j) {
                char c = s[i];
                s[i] =  s[j];
                s[j] = c;
            } else {
                break;
            }
        }
        ans = Math.max(ans, gao(s, l, a, b, T));

        System.out.println(ans);
    }

    public static int gao(char[] s, int[] l, int a, int b, int T) {
        int ans = 0;
        int t = -a;
        calLeft(s, l, a, b);
        for (int i = 0; i < s.length; i++) {
            t+=(a+1);
            if (s[i]=='w') {
                t+= b;
            }
            if (t <= T) {
                ans = Math.max(ans, i+1);
            }
            int t2 = T - t-i*a;
            if (t2 > 0) {
                int num = cntLeft(t2,l);
                ans = Math.max(ans, Math.min(s.length, num+i+1));
            }
        }
        return ans;
    }

    public static void calLeft(char[] s, int[] l, int a, int b) {
        for (int i = 1; i < s.length; i++) {
            l[i] = l[i-1]+a+1;
            if (s[s.length-i] == 'w')  l[i]+=b;
        }
    }

    public static int cntLeft(int t, int[] l) {
        if (t <= l[0])  return 0;
        if (t >= l[l.length -1]) return l.length - 1;
        int st = 0, ed = l.length - 1;
        while (st + 1 < ed) {
            int md = (st+ed)/2;
            if (l[md] > t) {
                ed = md;
            } else {
                st = md;
            }
        }
        return st;
    }
}