import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.InputMismatchException;
import java.util.StringTokenizer;

public class DImagePreview {
    public static void main(String[] args) {
        QuickScanner sc = new QuickScanner();
        final int n = sc.nextInt();
        final int a = sc.nextInt();
        final int b = sc.nextInt();
        final int T = sc.nextInt();
        final boolean needRotate[] = new boolean[n];
        final String wh = sc.nextLine();
        for (int i = 0; i < n; i++) {
            needRotate[i] = wh.charAt(i) == 'w';
        }

        // Pre calculate right swiping
        int[] swipeRight = new int[n];
        swipeRight[0] = (needRotate[0] ? b : 0) + 1; // time for rotate (if needed) + time to see
        for (int i = 1; i < n; i++) {
            // time to get to left photo + time to swipe + time for rotate (if needed) + time to see
            swipeRight[i] = swipeRight[i - 1] + a + (needRotate[i] ? b : 0) + 1;
        }

        // Pre calculate left swiping
        int[] swipeLeft = new int[n];
        swipeLeft[0] = swipeRight[0]; // first photo is same as for swipeRight
        for (int i = 1; i < n; i++) {
            swipeLeft[i] = swipeLeft[i - 1] + a + (needRotate[n - i] ? b : 0) + 1;
        }

        // Number of watched photos
        int photos = 0;

        // Go right
        for (int i = 0; i < n; i++) {
            int timeRemain = T - swipeRight[i];
            if (timeRemain < 0) {
                break;
            }

            photos = Math.max(photos, i + 1);

            // Time to swipe left to first photo
            timeRemain -= i * a;

            // Binary search in left swipe
            if (timeRemain > 0) {
                int left = 0;
                int right = n;
                // Find where can we get by swiping left from first photo
                while (right - left > 1) {
                    int median = (left + right) / 2;
                    if (swipeLeft[median] - swipeLeft[0] <= timeRemain) {
                        left = median;
                    } else {
                        right = median;
                    }
                }
                // photos in right swipe + photos after left swipe, but less then all photos
                photos = Math.max(photos, Math.min(n, i + 1 + left));
            }
        }

        for (int i = 0; i < n; i++) {
            int timeRemain = T - swipeLeft[i];
            if (timeRemain < 0) {
                break;
            }

            photos = Math.max(photos, i + 1);

            timeRemain -= i * a;

            // Binary search in right swipe
            if (timeRemain > 0) {
                int left = 0;
                int right = n;
                // Find where can we get by swiping right from first photo
                while (right - left > 1) {
                    int median = (left + right) / 2;
                    if (swipeRight[median] - swipeRight[0] <= timeRemain) {
                        left = median;
                    } else {
                        right = median;
                    }
                }
                // photos in left swipe + photos after right swipe, but less then all photos
                photos = Math.max(photos, Math.min(n, i + 1 + left));
            }
        }

        System.out.println(photos);
    }

    private static class QuickScanner {
        BufferedReader myIn;
        StringTokenizer myToken;

        public QuickScanner() {
            this.myIn = new BufferedReader(new InputStreamReader(System.in));
            this.myToken = new StringTokenizer("", " \n\t");
        }

        public boolean hasNext() {
            while (!myToken.hasMoreTokens()) {
                try {
                    String s = myIn.readLine();
                    if (s == null) {
                        return false;
                    }
                    myToken = new StringTokenizer(s, " \n\t");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return true;
        }

        public String nextLine() {
            try {
                return myIn.readLine();
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }

        public String next() {
            hasNext();
            return myToken.nextToken();
        }

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

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

        public char nextChar() {
            return next().charAt(0);
        }
    }
}