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

public class D1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;

        st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int a = Integer.parseInt(st.nextToken());
        int b = Integer.parseInt(st.nextToken());
        int t = Integer.parseInt(st.nextToken());
        char[] orientation = br.readLine().toCharArray();

        long time = 0;
        long[] seenRight = new long[n];
        for (int i = 0; i < n; i++) {
            if (orientation[i] == 'w') {
                time += b;
            }
            time++;
            seenRight[i] = time;
            time += a;
        }

        time = 0;
        long[] seenLeft = new long[n];
        for (int i = n - 1; i > 0; i--) {
            if (orientation[i] == 'w') {
                time += b;
            }
            time++;
            seenLeft[i] = time;
            time += a;
        }

        int max = 0;
        for (int i = 0; i < n; i++) {
            time = seenRight[i];
            if (time > t) {
                break;
            }
            int seen = i + 1;
            max = Math.max(max, seen);

            //reverse direction
            time += (i + 1) * a;
            long timeLeft = t - time;
            if (timeLeft <= 0) {
                continue;
            }
            int start = n;
            int end = i;
            while (start - end > 1) {
                int mid = (start + end) / 2;
                if (seenLeft[mid] <= timeLeft) {
                    start = mid;
                } else {
                    end = mid;
                }
            }
            if (start < n) {
                seen += n - start;
            }
            max = Math.max(max, seen);
        }

        for (int i = n - 1; i > 0; i--) {
            time = seenRight[0] + a + seenLeft[i];
            if (time > t) {
                break;
            }
            int seen = n - i + 1;
            max = Math.max(max, seen);

            //reverse direction
            time += (n - i) * a;
            long timeLeft = t - time;
            if (timeLeft <= 0) {
                continue;
            }
            int start = 0;
            int end = i;
            while (end - start > 1) {
                int mid = (start + end) / 2;
                if (seenRight[mid] - seenRight[0] <= timeLeft) {
                    start = mid;
                } else {
                    end = mid;
                }
            }
            if (start > 0) {
                seen += start;
            }
            max = Math.max(max, seen);
        }
        System.out.println(max);
    }
}
