n, time_taken, orient, time = map(int ,raw_input().split())
tot_time = 0
curr = 0
photo_seen = 0
turns = raw_input()
curr_orient = "h"
for i in turns:

	if i == "w":

		if curr_orient == i:

			tot_time += time_taken
		else:

			tot_time += orient
			tot_time += time_taken
			curr_orient = "h"
		
		curr += 1
		
		if curr <= n:
			curr += 1
			tot_time += 1
		
		if tot_time <= time:
			photo_seen += 1
		else:
			break

	else:

		if curr_orient == i:

			tot_time += time_taken

		else:

			tot_time += orient
			tot_time += time_taken
			curr_orient = "w"

		curr += 1
		
		if curr <= n:
			curr += 1
			tot_time += 1
		
		if tot_time <= time:
			photo_seen += 1
		else:
			break


print photo_seen