s = raw_input()

s = s.split()
n = int(s[0])
a = int(s[1])
b = int(s[2])
t = int(s[3])

p = raw_input()

l = [] #list of times required for each photo

if(p[0] == 'w'):
	l.append( b + 1)
else:
	l.append(1)

for i in range (1, n):
	if(p[i] == 'w'):
		l.append(a + b + 1)
	else:
		l.append(a + 1)

print l
fw = [l[0]]
bw = [l[n-1]]

for i in range(1, n):
	fw.append(fw[i-1] + l[i])

k = 0
for i in range(n-2, 0, -1):
	bw.append(bw[k] + l[i])
	k += 1

print fw
print bw
m = 0
for i in range(0, len(fw)):
	if(fw[i] > t):
		break


	for j in range(0, len(bw) - i):
		if(fw[i] + bw[j] > t):
			break

	if(i+j+1 > m):
		m = i+j+1

print m


	