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

public class Main {

    static MyScanner   in;
    static PrintWriter out;
//    static Timer timer = new Timer();

    public static void main(String[] args) throws IOException {
        in = new MyScanner();
        out = new PrintWriter(System.out, true);

        int n = in.nextInt();
        int a = in.nextInt(), b = in.nextInt();
        int t = in.nextInt();

        char[] s = in.next().toCharArray();

        if (s[0] == 'w' && b > t) {
            out.println(0);
            return;
        }

        int cnt = 1;
        if (s[0] == 'w')
            t -= b;

        int[] left = new int[n], right = new int[n];

        for (int i = 1; i < n; i++)
            left[i] = left[i - 1] + 2 + (s[i] == 'h' ? 0 : b);
        for (int i = 1; i < n; i++)
            right[i] = right[i - 1] + 2 + (s[n - i] == 'h' ? 0 : b);

//        out.println(Arrays.toString(left));
//        out.println(Arrays.toString(right));

        int right_cnt = n - 1;

        loop:
        for (int i = 0; i < n; i++) {
            int sum = right[right_cnt] + left[i] + right_cnt + i;
            while (sum > t) {
                right_cnt--;
                sum = right[right_cnt] + left[i] + right_cnt + i;
                if (right_cnt == 0)
                    break loop;
            }

            cnt = Math.max(cnt, right_cnt + i + 1);
        }

        cnt = Math.min(cnt, n);

        out.println(cnt);

    }

}

class MyScanner {

    private final BufferedReader  br;
    private       StringTokenizer st;
    private       String          last;

    public MyScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    public MyScanner(String path) throws IOException {
        br = new BufferedReader(new FileReader(path));
    }

    public MyScanner(String path, String decoder) throws IOException {
        br = new BufferedReader(new InputStreamReader(new FileInputStream(path), decoder));
    }

    String next() throws IOException {
        while (st == null || !st.hasMoreElements())
            st = new StringTokenizer(br.readLine());
        last = null;
        return st.nextToken();
    }

    String nextLine() throws IOException {
        st = null;
        return (last == null) ? br.readLine() : last;
    }

    boolean hasNext() {
        if (st != null && st.hasMoreElements())
            return true;

        try {
            while (st == null || !st.hasMoreElements()) {
                last = br.readLine();
                st = new StringTokenizer(last);
            }
        }
        catch (Exception e) {
            return false;
        }

        return true;
    }

    String[] nextStrings(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = next();
        return arr;
    }

    String[] nextLines(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLine();
        return arr;
    }

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

    int[] nextInts(int n) throws IOException {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    Integer[] nextIntegers(int n) throws IOException {
        Integer[] arr = new Integer[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    int[][] next2Ints(int n, int m) throws IOException {
        int[][] arr = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextInt();
        return arr;
    }

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

    long[] nextLongs(int n) throws IOException {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLong();
        return arr;
    }

    long[][] next2Longs(int n, int m) throws IOException {
        long[][] arr = new long[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextLong();
        return arr;
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next().replace(',', '.'));
    }

    double[] nextDoubles(int size) throws IOException {
        double[] arr = new double[size];
        for (int i = 0; i < size; i++)
            arr[i] = nextDouble();
        return arr;
    }

    boolean nextBool() throws IOException {
        String s = next();
        if (s.equalsIgnoreCase("true") || s.equals("1"))
            return true;

        if (s.equalsIgnoreCase("false") || s.equals("0"))
            return false;

        throw new IOException("Boolean expected, String found!");
    }
}