import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Main {
    public static void main(String[] args) {
//     Test.testing();
        ConsoleIO io = new ConsoleIO();
        new Main(io).solve();
        io.flush();
    }
    ConsoleIO io;
    Main(ConsoleIO io) {
        this.io = io;
    }

    ArrayList<ArrayList<Integer>> gr1;
    boolean[] visit;
    //

    class Pair{
        public Pair(int a, int b){
            this.a = a;
            this.b = b;
        }
        public int a;
        public int b;
    }

    class Edge {
        public Edge(int c, int u,int v) {
            this.u = u;
            this.v = v;
            this.c = c;
        }
        public int u;
        public int v;
        public int c;
    }

    class Two{
        public Two(String a, String b){
            this.a = a;
            this.b = b;
        }
        public String a;
        public String b;
    }

    long MOD = 1_000_000_007;
    int n,m,k;
    int[][] map;
    int move, change,time;
    public void solve() {
        int[] l = io.readIntArray();
        n = l[0];
        move = l[1];
        change = l[2];
        time = l[3];

        char[] c = io.readLine().toCharArray();
        char[] c2= new char[n];
        c2[0] = c[0];
        for(int i = 1;i<n;i++)c2[i] = c[n-i];

        int res = Math.max(calc(c), calc(c2));




        io.writeLine(res+"");

    }

    int calc(char[] c) {
        int res = 0;
        int[] a1 = new int[n];

        for (int i = 0; i < n; i++) {
            a1[i] = 1 + (c[i] == 'w' ? change : 0);
            if (i > 0) {
                a1[i] += a1[i - 1] + move;
            }
            if (a1[i] <= time) res = i + 1;
        }

        if (a1[n - 1] <= time) {
            return n;
        }

        int curBack = 0;
        int j = n - 1;
        for (int i = n - 2; i >= 0 && j >= 0; ) {
            int cur = a1[i] + i * move;
            if (cur + curBack > time) {
                i--;
                continue;
            }
            res = Math.max(res, n - j + i);
            curBack += 1 + move + (c[j] == 'w' ? change : 0);
            j--;
        }
        return res;
    }

    long gcd(long a, long b) {
        if (a < b) return gcd(b, a);
        if (b == 0) return a;
        return gcd(b, a % b);
    }
}

class ConsoleIO {
    BufferedReader br;
    PrintWriter out;
    public ConsoleIO(){br = new BufferedReader(new InputStreamReader(System.in));out = new PrintWriter(System.out);}
    public void flush(){this.out.close();}
    public void writeLine(String s) {this.out.println(s);}
    public void writeInt(int a) {this.out.print(a);this.out.print(' ');}
    public void writeWord(String s){
        this.out.print(s);
    }
    public String readLine() {try {return br.readLine();}catch (Exception ex){ return "";}}
    public long readLong() {
        return Long.parseLong(this.readLine());
    }
    public int readInt() {
        return Integer.parseInt(this.readLine().trim());
    }
    public long[] readLongArray() {
        String[]n=this.readLine().trim().split("\\s+");long[]r=new long[n.length];
        for(int i=0;i<n.length;i++)r[i]=Long.parseLong(n[i]);
        return r;
    }
    public int[] readIntArray() {
        String[]n=this.readLine().trim().split("\\s+");int[]r=new int[n.length];
        for(int i=0;i<n.length;i++)r[i]=Integer.parseInt(n[i]);
        return r;
    }
    public void writeIntArray(int[] a) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < a.length; i++) {if (i > 0) sb.append(' ');sb.append(a[i]);}
        this.writeLine(sb.toString());
    }
}


