import java.util.Scanner;

public class CF_651D {
	public static int a,b,T,n;
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt();
		a = scan.nextInt();
		b = scan.nextInt();
		T = scan.nextInt();
		scan.nextLine();
		String line = scan.nextLine();
		boolean[] needsFlip = new boolean[n];
		for(int i=0;i<n;i++)
			needsFlip[i] = line.charAt(i) == 'w';
		line = null;
		int ptrLeft = 0;
		int ptrRight = 0;
		int t = needsFlip[0] ? b : 0;
		if(t > T) {
			System.out.println(0);
			return;
		}
		while(calcTime(t,ptrLeft,ptrRight) <= T) {
			ptrRight++;
			if(ptrRight == n) {
				System.out.println(n);
				return;
			}
			if(needsFlip[ptrRight]) {
				t += b;
			}
		}
		int ans = ptrRight;
		ptrLeft--;
		if(needsFlip[n+ptrLeft])
			t += b;
		while(ptrRight >= 0) {
			if(calcTime(t,ptrLeft,ptrRight) > T) {
				if(needsFlip[ptrRight])
					t -= b;
				ptrRight--;
				continue;
			}
			if(ptrRight - ptrLeft + 1 == n) {
				System.out.println(n);
				return;
			}
			ans = Math.max(ptrRight-ptrLeft+1, ans);
			ptrLeft--;
			if(needsFlip[n+ptrLeft])
				t += b;
		}
		
		
		System.out.println(ans);
	}
	public static int calcTime(int t, int ptrLeft, int ptrRight) {
		return t + a * (Math.min(Math.abs(ptrLeft), ptrRight) * 2 + Math.max(Math.abs(ptrLeft), ptrRight)) + ptrRight - ptrLeft + 1;
	}
}
