def main():
    from bisect import bisect_right
    n, a, b, t = map(int, input().split())
    a += 1
    b += a
    x, l, m = 0, [0], [b if c == "w" else a for c in input()]
    f = l.append
    for _ in 0, 0:
        for y in m:
            x += y
            f(x)
    if l[1] >= t + a:
        print(0)
        return
    m = []
    f = m.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(m) - 1, n))


if __name__ == '__main__':
    main()
