Vasya's telephone contains n photos. Photo number 1 is currently opened on the phone. It is allowed to move left and right to the adjacent photo by swiping finger over the screen. If you swipe left from the first photo, you reach photo n. Similarly, by swiping right from the last photo you reach photo 1. It takes a seconds to swipe from photo to adjacent.

For each photo it is known which orientation is intended for it — horizontal or vertical. Phone is in the vertical orientation and can't be rotated. It takes b second to change orientation of the photo.

Vasya has T seconds to watch photos. He want to watch as many photos as possible. If Vasya opens the photo for the first time, he spends 1 second to notice all details in it. If photo is in the wrong orientation, he spends b seconds on rotating it before watching it. If Vasya has already opened the photo, he just skips it (so he doesn't spend any time for watching it or for changing its orientation). It is not allowed to skip unseen photos.

Help Vasya find the maximum number of photos he is able to watch during T seconds.

Input

The first line of the input contains 4 integers n, a, b, T (1 ≤ n ≤ 5·105, 1 ≤ a, b ≤ 1000, 1 ≤ T ≤ 109) — the number of photos, time to move from a photo to adjacent, time to change orientation of a photo and time Vasya can spend for watching photo.

Second line of the input contains a string of length n containing symbols 'w' and 'h'. 

If the i-th position of a string contains 'w', then the photo i should be seen in the horizontal orientation.

If the i-th position of a string contains 'h', then the photo i should be seen in vertical orientation.

Output

Output the only integer, the maximum number of photos Vasya is able to watch during those T seconds.

Examples

Input

4 2 3 10
wwhw


Output

2


Input

5 2 4 13
hhwhh


Output

4


Input

5 2 4 1000
hhwhh


Output

5


Input

3 1 100 10
whw


Output

0

Note

In the first sample test you can rotate the first photo (3 seconds), watch the first photo (1 seconds), move left (2 second), rotate fourth photo (3 seconds), watch fourth photo (1 second). The whole process takes exactly 10 seconds.

Note that in the last sample test the time is not enough even to watch the first photo, also you can't skip it.
import java.io.*;
import java.util.*;
import java.math.*;

public class Kruskal {
	private static InputStream stream;
	private static byte[] buf = new byte[1024];
	private static int curChar;
	private static int numChars;
	private static SpaceCharFilter filter;
	private static PrintWriter pw;

	public static void main(String args[]) throws Exception {
		InputReader(System.in);
		pw = new PrintWriter(System.out);
		//ans();
		soln();
		pw.close();
	}
	

	// To Get Input
	// Some Buffer Methods
 
	public static void InputReader(InputStream stream1) {
		stream = stream1;
	}
 
	private static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
 
	private static boolean isEndOfLine(int c) {
		return c == '\n' || c == '\r' || c == -1;
	}
 
	private static int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}
 
	private static int nextInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
 
	private static long nextLong() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
 
	private static String nextToken() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}
 
	private static String nextLine() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isEndOfLine(c));
		return res.toString();
	}
 
	private static int[] nextIntArray(int n) {
		int[] arr = new int[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nextInt();
		}
		return arr;
	}
 
	private static int[][] next2dArray(int n, int m) {
		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;
	}
	private static char[][] nextCharArray(int n,int m){
		char [][]c=new char[n][m];
		for(int i=0;i<n;i++){
			String s=nextLine();
			for(int j=0;j<s.length();j++){
				c[i][j]=s.charAt(j);
			}
		}
		return c;
	}
 
	private static long[] nextLongArray(int n) {
		long[] arr = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = nextLong();
		}
		return arr;
	}
 
	private static void pArray(int[] arr) {
		for (int i = 0; i < arr.length; i++) {
			pw.print(arr[i] + " ");
		}
		pw.println();
		return;
	}
 
	private static void pArray(long[] arr) {
		for (int i = 0; i < arr.length; i++) {
			pw.print(arr[i] + " ");
		}
		pw.println();
		return;
	}
 
	private static void pArray(boolean[] arr) {
		for (int i = 0; i < arr.length; i++) {
			pw.print(arr[i] + " ");
		}
		pw.println();
		return;
	}
 
	private static boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}
 
	private interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
	
	private static void soln(){


		int n=nextInt();
		long swipe=nextLong();
		long orient=nextLong();
		int time=nextInt();
		
		String s=nextLine();
		
		long right[]=new long[n+1];
		for(int i=0;i<s.length();i++){
			if(s.charAt(i)=='w')
				right[i+1]+=orient;
			right[i+1]++;
			if(i>0) right[i+1]+=swipe;
			right[i+1]+=right[i];
		}
		
		long left[]=new long[n+1];
				for(int i=s.length()-1;i>=0;i--){
					if(s.charAt(i)=='w')
						left[s.length()-i]+=orient;
					left[s.length()-i]++;
					left[s.length()-i]+=swipe;
					left[s.length()-i]+=left[s.length()-i-1];
				}
			
				int an=0;
				for(int i=1;i<=n;i++){
					if(right[i]<=time){
						long time_left=time-(right[i]+((i-1)*swipe));
						int no_seen=i;
						int l=1,r=n-i;
						while(l<r){
							int mid=(l+r)/2;
							if(left[mid]<=time_left){
								l=mid+1;
								no_seen=i+mid;
							}else{
								r=mid;
							}
						}
					
					an=Math.max(an, no_seen);
					
					}else{
						break;
					}
				//	System.out.println(i);
					}
				//System.out.println(an);
				for(int i=1;i<=n;i++){
					if(left[i]<=time){
						long time_left=time-(left[i]+i*swipe);
						int l=1,r=n-i+1;
						int no_seen=-1;
						while(l<r){
							int mid=(l+r)/2;
							if(right[mid]<=time_left){
								l=mid+1;
								no_seen=i+mid;
							}else{
								r=mid;
							}
						}
						an=Math.max(an, no_seen);
					}else{
						break;
					}
				}
				pw.println(an);
				
}
}
class Dsu{
	private int rank[], parent[] ,n;
	
	Dsu(int size){
		this.n=size+1;
		rank=new int[n];
		parent=new int[n];
	makeSet();
	}
	
	void makeSet(){
		for(int i=0;i<n;i++){
			parent[i]=i;
		}
	}
	
	int find(int x){
		if(parent[x]!=x){
			
			parent[x]=find(parent[x]);
		}
		return parent[x];
	}	
	
	void union(int x,int y){
		int xRoot=find(x);
		int yRoot=find(y);
		
		if(xRoot==yRoot)
			return;
		if(rank[xRoot]<rank[yRoot]){
		parent[xRoot]=yRoot;	
		}else if(rank[yRoot]<rank[xRoot]){
			parent[yRoot]=xRoot;
		}else{
			parent[yRoot]=xRoot;
			rank[xRoot]++;
		}
		
	}
 
}
class Pair implements Comparable<Pair>{

	int u,v,w;
	 Pair(int from,int to,int dist) {
		 u=from;
		 v=to;
		 w=dist;
		// TODO Auto-generated constructor stub
	
	}
	@Override
	public int compareTo(Pair arg0) {
		// TODO Auto-generated method stub
		return w-arg0.w;
	}
	
}
class Graph{
	private int V;
	private boolean Visited[];
	private LinkedList<Node> adj[];
	Graph(int V){
		this.V=V++;
		Visited=new boolean[V];
		adj=new LinkedList[V];
		for(int i=0;i<V;i++){
			adj[i]=new LinkedList<Node>();
		}
	}
	void addEdge(int u,int v,int w){
		adj[u].add(new Node(v,w));
	}
	
	
}

class Node{
	int v,w;
	Node(int to,int dist){
		v=to;
		w=dist;
	}
	public int getV() {
		return v;
	}
	public int getW() {
		return w;
	}
	
}
