#abc300f. [abc300_f]More Holidays

[abc300_f]More Holidays

Problem Statement

You are given a string SS of length NN consisting of o and x, and integers MM and KK.
SS is guaranteed to contain at least one x.

Let TT be the string of length NMNM obtained by concatenating MM copies of SS. Consider replacing exactly KK x's in TT with o.
Your objective is to have as long a contiguous substring consisting of o as possible in the resulting TT.
Find the maximum length of a contiguous substring consisting of o that you can obtain.

Constraints

  • NN, MM, and KK are integers.
  • 1leNle3times1051 \\le N \\le 3 \\times 10^5
  • 1leMle1091 \\le M \\le 10^9
  • 1leKlex1 \\le K \\le x, where xx is the number of x's in the string TT.
  • SS is a string of length NN consisting of o and x.
  • SS has at least one x.

Input

The input is given from Standard Input in the following format:

NN MM KK SS

Output

Print the answer as an integer.


Sample Input 1

10 1 2
ooxxooooox

Sample Output 1

9

S=S= ooxxooooox and T=T= ooxxooooox.
Replacing x at the third and fourth characters with o makes T=T= ooooooooox.
Now we have a length-99 contiguous substring consisting of o, which is the longest possible.


Sample Input 2

5 3 4
oxxox

Sample Output 2

8

S=S= oxxox and T=T= oxxoxoxxoxoxxox.
Replacing x at the 5,7,85,7,8 and 1010-th characters with o makes T=T= oxxooooooooxxox.
Now we have a length-88 contiguous substring consisting of o, which is the longest possible.


Sample Input 3

30 1000000000 9982443530
oxoxooxoxoxooxoxooxxxoxxxooxox

Sample Output 3

19964887064