import java.io.*;
import java.util.*;

public class Solution {

    private static void solve(InputReader in, OutputWriter out) {
        int n = in.nextInt();
        int a = in.nextInt();
        int b = in.nextInt();
        int t = in.nextInt();
        String s = in.next();

        if (n == 1) {
            if ((s.charAt(0) == 'w' ? b : 0) + 1 <= t)
                out.print(1);
            else
                out.print(0);

            return;
        }

        int[] right = new int[n];
        right[0] = (s.charAt(0) == 'w' ? b : 0) + 1;
        for (int i = 1; i < right.length; i++)
            right[i] = right[i - 1] + a + (s.charAt(i) == 'w' ? b : 0) + 1;

        int[] left = new int[n - 1];
        left[0] = a + (s.charAt(n - 1) == 'w' ? b : 0) + 1;
        for (int i = 1; i < left.length; i++)
            left[i] = left[i - 1] + a + (s.charAt(n - 1 - i) == 'w' ? b : 0) + 1;

        int max = 0;
        for (int i = 0; i < right.length; i++) {
            int time = t - right[i];
            if (time < 0) break;

            int cur = i + 1;
            int index = Arrays.binarySearch(left, time - (cur - 1) * a);

            if (index >= 0)
                cur += index + 1;
            else
                cur += Math.abs(index + 1);

            if (cur > max) {
                max = cur;
                if (max >= n) break;
            }
        }

        if (max < n) {
            for (int i = 0; i < left.length; i++) {
                int time = t - left[i];
                if (time < 0) break;

                int cur = i + 1;
                int index = Arrays.binarySearch(right, time - cur * a);

                if (index >= 0)
                    cur += index + 1;
                else
                    cur += Math.abs(index + 1);

                if (cur == i + 1) break;
                if (cur > max) max = cur;
            }
        }

        if (max > n)
            out.print(n);
        else
            out.print(max);
    }

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        solve(in, out);
        in.close();
        out.close();
    }

    private static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        InputReader(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }

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

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String line = nextLine();
                if (line == null) return null;
                st = new StringTokenizer(line);
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

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

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

        void close() {
            try {
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private static class OutputWriter {
        BufferedWriter bw;

        OutputWriter(OutputStream os) {
            bw = new BufferedWriter(new OutputStreamWriter(os));
        }

        void print(int i) {
            print(Integer.toString(i));
        }

        void println(int i) {
            println(Integer.toString(i));
        }

        void print(long l) {
            print(Long.toString(l));
        }

        void println(long l) {
            println(Long.toString(l));
        }

        void print(double d) {
            print(Double.toString(d));
        }

        void println(double d) {
            println(Double.toString(d));
        }

        void print(boolean b) {
            print(Boolean.toString(b));
        }

        void println(boolean b) {
            println(Boolean.toString(b));
        }

        void print(char c) {
            try {
                bw.write(c);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        void println(char c) {
            println(Character.toString(c));
        }

        void print(String s) {
            try {
                bw.write(s);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        void println(String s) {
            print(s);
            print('\n');
        }

        void close() {
            try {
                bw.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
