Bob must distribute advertising booklets for extra-curricular activities to several schools. The booklets have different numbers of pages. Given the page count of every booklet and the number of schools, Bob hands them out so that each school receives either the lower integer part (LIP) or the upper integer part (UIP) of (number of booklets) / (number of schools) — that is, $\lfloor B / S \rfloor$ or $\lceil B / S \rceil$ booklets, where $B$ is the number of booklets and $S$ is the number of schools.
Bob must also obey these rules:
Back at the company, Bob's boss asks for the number of pages of the first booklet distributed to a particular school, where schools are numbered from $0$ in the order Bob served them. Compute that number.
The input contains several data sets; read them until the end of the file. Each data set gives, in order: the number of schools, the index of the school specified by the boss (numbered from $0$), the number of booklets (fewer than $3000$), and then the number of pages of each booklet (each value fits in an integer). Whitespace may appear freely between the numbers. The input is always valid.
For each data set, print on its own line the number of pages of the first booklet distributed to the specified school.