import java.awt.Checkbox;
import java.util.*;

public class D {
	static int T, n, x, y;
	static int[] a = new int[500005];
	static int[] b = new int[500005];
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);
		n = cin.nextInt();
		x = cin.nextInt();
		y = cin.nextInt();
		T = cin.nextInt();
		char[] st = cin.next().toCharArray();
		if (st[0] == 'h') T -= 1;
		else T -= y + 1;
//		System.out.println(T);
		if (T < 0)
			System.out.println(0);
		else
		{
			
			a[1] = 0;
			for (int i = 2; i <= n; i++)
			{
				a[i] = a[i - 1] + x + 1;
				if (st[i - 1] == 'w') a[i] += y;
			}
			b[0] = 0;
			for (int i = 1; i <= n; i++)
			{
				b[i] = b[i - 1] + x + 1;
				if (st[n - i] == 'w') b[i] += y;
			}
			int L = 1, R = n;
			while (L + 1 < R)
			{
				int mid = (L + R) / 2;
				if (check(mid) != 0) L = mid;
				else R = mid - 1;
			}
			if (check(R) != 0) L = R;
			System.out.println(L);
		}
	}
	public static int check(int ans)
	{
		int ok = 0;
		for (int i = 1; i < ans; i++)
		{
			if (a[i] + b[ans - i] + x * (i - 1) <= T) ok = 1;
			if (b[i] + a[ans - i] + x * i <= T) ok = 1;
		}
		if (a[ans] <= T || b[ans] <= T) ok = 1;
		return ok;
	}
}
