n, a, b, T = map(int, raw_input().split())
s = list(raw_input())
# print s

pre = [0 + 1 + (b if s[0] == 'w' else 0)]*(n)
suff = [0 + 1 + (b if s[n-1] == 'w' else 0)]*(n)

for i in range(1, n):
	pre[i] = pre[i-1] + 1 + (b if s[i] == 'w' else 0)

for i in range(1, n):
	j = n-1-i
	suff[j] = suff[j+1] + 1 + (b if s[j] == 'w' else 0)

suff.append(0)
# print pre, suff


# assert False
l = 0; r = 0; ans = -1
#invariant 0--l and r+1 to n-1
ansl = -1; ansr = n-1
while l<n and r+1<n:

	# cT = pre[l]+suff[r+1]+\
	# 			2*a*(min(l+1,n-(r+1))-1)+a*(max(l+1,n-(r+1))-1)+a

	# cT = pre[l]+suff[r+1]+\
			# l*a + a*(n-2-r) + a*min(l, n-2-r)  +a
		

	# print l, r, cT
	
	while l<n and r+1<n and pre[l]+suff[r+1]+\
			    l*a + a*(n-2-r) + a*min(l, n-2-r)  +a > T:
		
		cT = pre[l]+suff[r+1]+\
			  l*a + a*(n-2-r) + a*min(l, n-2-r)  +a

		# print 'ct', cT
		r += 1
		# print l, "  ", r		

	cT = pre[l]+suff[r+1]+\
				  l*a + a*(n-2-r) + a*min(l, n-2-r)  +a

	# print l, r, cT, "intermidate"
	if cT <= T and ansl+n-ansr < l+n-r:
		ansl = l; ansr = r;
		# print 'ans updated', ansl, ansr

	l += 1

	if l > r:
		r = l

	# print l, r, cT, "updated"

print n+ansl-ansr