A. Take One
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

It's trick-or-treating time, and since Randy is too lazy to hand out candy, he has placed a bowl of candy outside of his door. Knowing that there are many kids in his neighborhood, Randy plans to fill this bowl $$$k$$$ times over the course of the evening, where each time he fills the bowl up to its maximum capacity of $$$c$$$ pieces of candy. Note that initially the bowl is empty.

To keep the bowl from being emptied too quickly, Randy has placed a label on the bowl which says "Take One". As expected, however, not every trick-or-treater follows Randy's one candy rule. In particular, there are two types of kids in Randy's neighborhood: good kids, who actually take one piece of candy (if there is candy remaining), and evil kids, who will take everything from the bowl.

Having been a good kid in the past, Randy wants to make sure the good kids get more candy. Given a sequence of $$$n$$$ kids who arrive at Randy's doorway for candy at distinct times, can you help Randy find the maximum amount of candy that the good kids take from his bowl?

Input

The first line contains three integers $$$n$$$, $$$c$$$, and $$$k$$$ ($$$1 \le n, c, k \le 10^5$$$) – the number of kids who will arrive at Randy's doorway for candy, the capacity of Randy's candy bowl, and the number of times Randy will fill the bowl with candy.

The second line contains $$$n$$$ space-separated integers, where the $$$i$$$-th integer is $$$1$$$ if the $$$i$$$-th kid to arrive is good and $$$0$$$ if the $$$i$$$-th kid is bad.

Output

Output a single integer – the maximum amount of candy that Randy can give away to good kids.

Example
Input
5 4 1
1 1 1 0 0
Output
3
Note

In the sample test case, Randy can fill the bowl before the first kid arrives. Then the first three kids (who are all good) will each take one piece of candy, the fourth kid will take the remaining piece of candy, and the fifth kid will have no candy to take. This allows Randy to give three pieces of candy away to good kids, which is the maximum amount possible.