import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author master_j
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MjInput in = new MjInput(inputStream);
        MjOutput out = new MjOutput(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        MjInput in;
        MjOutput out;
        int n;
        int a;
        int b;
        int T;
        char[] cs;

        int solve0() {
            if (1 + (cs[0] == 'w' ? b : 0) > T)
                return 0;

            int ans = 0;

            ans = Math.max(ans, allRight());
            if (ans == cs.length)
                return ans;

            int ptr = cs.length;
            int timeLeft = 0;
            while (ptr > 1) {
                ptr--;
                timeLeft++;
                timeLeft += a;
                if (cs[ptr] == 'w')
                    timeLeft += b;
            }

            int timeRight = 1 + (cs[0] == 'w' ? b : 0);
            for (int i = 1; i < cs.length; i++) {
                timeRight += a;
                if (cs[i] == 'w')
                    timeRight += b;
                timeRight++;
                timeRight += a;
                if (timeRight > T)
                    break;
                while (ptr < cs.length - 1 && timeLeft + timeRight > T) {
                    if (cs[ptr] == 'w')
                        timeLeft -= b;
                    timeLeft -= a;
                    timeLeft--;
                    ptr++;
                }
                if (timeLeft + timeRight <= T)
                    ans = Math.max(ans, 1 + i + cs.length - ptr);
            }

            return ans;
        }

        void solve() {
            n = in.nextInt();
            a = in.nextInt();
            b = in.nextInt();
            T = in.nextInt();
            cs = in.next().toCharArray();

            int ans = 0;

            ans = Math.max(ans, solve0());

            for (int i = 1, j = cs.length - 1; i < j; i++, j--) {
                char t = cs[i];
                cs[i] = cs[j];
                cs[j] = t;
            }

            ans = Math.max(ans, solve0());

            out.print(ans);
        }

        int allRight() {
            int res = 0;
            int time = -a;
            for (char c : cs) {
                time += a;
                if (c == 'w')
                    time += b;
                time++;
                if (time > T)
                    break;
                res++;
            }
            return res;
        }

        public void solve(int testNumber, MjInput in, MjOutput out) {
            this.in = in;
            this.out = out;
            solve();
        }

    }

    static class MjOutput extends PrintWriter {
        public MjOutput(Writer writer) {
            super(writer);
        }

        public MjOutput(OutputStream outputStream) {
            super(outputStream);
        }


        public void close() {
            super.close();
        }

    }

    static class MjInput {
        private StringTokenizer stringTokenizer;
        private BufferedReader bufferedReader;

        public MjInput(InputStream is) {
            bufferedReader = new BufferedReader(new InputStreamReader(is));
        }

        public boolean hasMoreTokens() {
            if (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
                String nextLine = nextLine();
                if (nextLine == null)
                    return false;
                stringTokenizer = new StringTokenizer(nextLine);
            }
            return true;
        }

        public String nextLine() {
            try {
                stringTokenizer = null;
                return bufferedReader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
                return null;
            }
        }

        public String next() {
            return hasMoreTokens() ? stringTokenizer.nextToken() : null;
        }

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

    }
}

