Limits 1s, 512 MB

Mr. Jack is a Genetic Engineer but he is not good at Mathematics. At this moment, he is facing a math problem. Jack knows that you are a good programmer of SUST ACM LAB-332B. So he needs your help.

You will be given an array of length n and another integer k. You have to choose a contiguous subarray of length k such that the product of all elements of the subarray is maximum.

Input

First line contains two integer n (1 <= n <= 100000) and k (1 <= k <= n) denoting array length and subarray length respectively.


The second line contains n space separated integers.It is confirmed that all values are a power of 2 and [2^0,2^62].

Output

If there are several subarrays of length which product is maximum then you have to choose that subarray which starting index is minimum.

Just print the starting index of the subarray. Assume the array is 1 based indexed.

Sample

InputOutput
5 2
1 2 4 8 16
4

Submit

Login to submit.

Statistics

79% Solution Ratio
Jorinar_JamaiEarliest, Nov '17
Kuddus.6068Fastest, 0.0s
tanu_RUETLightest, 524 kB
BruteforcekidShortest, 420B
Toph uses cookies. By continuing you agree to our Cookie Policy.