There is a linear portion of road composed of $$$N$$$ units denoted by either a period (".") for pavement or an asterisk ("*") for a traffic light. The traffic lights do not count in the length of the road. Cobby the construction worker is told that he must remove exactly one traffic light so that there are no more than $$$L$$$ traffic lights every kilometer on the road. However, since he is American, he has no idea how long a kilometer is. Please help Cobby find the maximum length a kilometer could be, in units.
Traffic lights at the end of the boundary of a kilometer are not counted in the traffic light count for that kilometer. It is guaranteed that there is at least one unit of road separating two traffic lights.
Line 1: Two space-separated integers $$$N$$$ and $$$L$$$ ($$$1 ≤ L \lt N ≤ 10^6$$$).
Line 2: A string of length $$$N$$$ representing the road with traffic lights.
Line 1: An integer representing the maximum length a kilometer could be, in units.
15 2*...*.*..*...*.
7
If a kilometer is $$$7$$$ units long, the third traffic light could be removed so that the distance of road after the second traffic light has no more than $$$2$$$ traffic lights. Note that only the road portions (".") count in the distance of the kilometer.