import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.util.StringTokenizer;

// Codeforces Round #345 (Div. 2)
// Image Preview
public class Problem_651_D {
    
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);
        Problem_651_D solver = new Problem_651_D();
        solver.solve(1, new InputStreamReader(inputStream), out);
        out.close();
    }
    
    long time(int l, int r, int ws, long A, long B)
    {
      return
          ws * B +
          (l + r) +
          Math.min(l, r - 1) * 2 * A +
          Math.max(l, r - 1) * A;
    }
    
    public void solve(int test, Reader input, PrintWriter out)
    {
        MyScanner in = new MyScanner(input);

        int n = in.nextInt();
        long a = in.nextInt();
        long b = in.nextInt();
        int T = in.nextInt();
        
        char[] s = in.next().toCharArray();

        int r = 0, ws = 0;
        for (; r < n; ++r) {
          ws += (s[r] == 'w' ? 1 : 0);
        }

        int l = 0;
        int res = 0;
        for (; r >= 1; --r) {
          while (time(l, r, ws, a, b) <= T) {
            res = Math.max(res, l + r);
            if (l + r >= n) break;
            ws += (s[n - l - 1] == 'w' ? 1 : 0);
            ++l;
          }
          ws -= (s[r - 1] == 'w' ? 1 : 0);
        }
        out.println(res);
    }

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner(Reader reader) {
            br = new BufferedReader(reader);
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        
        int[] nextIntArray(int n)
        {
            int[] r = new int[n];
            for(int i = 0; i < n; i++)
                r[i] = nextInt();
            return r;
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    //--------------------------------------------------------

}
