def main():
    n, a, b, T = map(int, raw_input().split())
    S = raw_input()
    i = 0
    ans_left = 0
    T_ = T
    while i < n and T_ > 0:
        if S[i] == 'w': T_ -= b
        if T_ >= 0: 
            T_ -= 1
            ans_left += 1
        T_ -= a
        i += 1

    S_rev = S[0] + S[::-1]
    i = 0
    ans_right = 0
    while i < n and T > 0:
        if S_rev[i] == 'w': T -= b
        if T >= 0:
            T -= 1
            ans_right += 1
        T -= a
        i += 1
    
    print max(ans_left, ans_right)
    
if __name__ == '__main__':
    main()
    
        