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

public class Main {
    public static void main(String[] args) {
        QuickScanner sc = new QuickScanner();
        int n = sc.nextInt();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int t = sc.nextInt();

        // true - if photo should be rotated
        String str = sc.next();
        boolean[] photos = new boolean[n];
        for (int i = 0; i < n; i++) {
            photos[i] = 'w' == str.charAt(i);
        }

        // 2, 3
        // [true, true, false, false]
        // [4   , 10  , 13   , 16   ]
        int[] timeRight = fillTime(n, a, b, photos);

        // n = 4
        //[1, 2, 3, 4]
        // n = 4
        // 1
        int mid = ((n - 1) / 2);
        for (int i = 1; i <= mid; i++) {
            boolean tmp = photos[i];
            photos[i] = photos[n - i];
            photos[n - i] = tmp;
        }

        // [true, false, false, true]
        // [4   , 7    , 10   , 16  ]
        int[] timeLeft = fillTime(n, a, b, photos);

        int maxRight = findMax(n, a, t, timeRight, timeLeft);
        int maxLeft = findMax(n, a, t, timeLeft, timeRight);
        System.out.println(Math.max(maxRight, maxLeft));
    }

    private static int[] fillTime(int n, int a, int b, boolean[] photos) {
        int[] timeRight = new int[n];
        for (int i = 0; i < n; i++) {
            timeRight[i] = (i == 0 ? 0 : timeRight[i - 1] + a) + (photos[i] ? b : 0) + 1;
        }
        return timeRight;
    }

    // 15
    // [4, 10, 13, 16]
    // [4,  7, 10, 16]
    private static int findMax(int n, int a, int t, int[] time, int[] timeRev) {
        int max = 0;
        for (int i = 0; i < n; i++) {
            if (time[i] > t) break;

            // if we are here we can see at least i + 1 photos
            // 15 - 4 - 2*0 + 4 = 15
            int timeLeft = t - time[i] - a * i + timeRev[0];
            int left = timeLeft < 0 ? 0 : findMaxLeft(timeRev, timeLeft, 0, n - 1);
            if (left + i + 1 > max) {
                max = left + i + 1;
            }
        }
        return Math.min(max, n);
    }

    // [4, 10, 13, 16], 15, 2, 3
    private static int findMaxLeft(int[] time, int left, int start, int end) {
        if (time[end] <= left) return end;
        if (time[start] > left) return 0;
        if (start == end) return time[start] < left ? start : 0;

        int mid = start + (end - start) / 2;
        if (time[mid] <= left && time[mid + 1] > left) {
            return mid;
        }

        if (time[mid] > left) {
            return findMaxLeft(time, left, start, mid - 1);
        }
        return findMaxLeft(time, left, mid, end);
    }

    private static class QuickScanner {
        BufferedReader in;
        StringTokenizer token;

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

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

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

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

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