def main():
    from bisect import bisect_right
    n, a, b, t = map(int, input().split())
    l = [a + 1] * (n * 2 + 1)
    b += a + 1
    for i, j, c in zip(range(n), range(n, n * 2), input()):
        if c == "w":
            l[i] = l[j] = b
    l[n] -= a
    if l[n] > t:
        print(0)
        return
    l[0] = a = 0
    for i, b in enumerate(l):
        a += b
        l[i] = a
    res = []
    f = res.append
    for i in range(n, 0, -1):
        j = bisect_right(l, l[i] + t)
        if j < n:
            break
        f(j - i)
    print(min(max(res) - 1, n))


if __name__ == '__main__':
    main()
