# 2018 Innopolice First Stage, December 1

# Stones Distribution

There is an amazingly equipped hi-tech sauna in Innopolis sport center. However, due to complex techniques were used while building it people are not sure how to maintain it properly.

There are **n** - **1** consecutive compartments in the sauna. Between each pair of adjacent compartments, there is a stove. There are two more stoves: one connected only to the first compartment, and one connected only to the last, which makes exactly **n** stoves.

The **i**-th compartment has volume `k`

. Each stove can have from _{i}**0** to **v** stones. Let `p`

be the number of stones in the_{i}**i**-th stove, then the **i**-th compartment receives `k`

* _{i}`p`

* _{i}`p`

units of heat._{i+1}

There are **s** stove stones in sport center. Sport center management wants to minimize the sum of heat received by all compartments, so the rest of the building would not be heated up, but all stones have to be used as it is a waste to buy them otherwise. Help them solve the problem.

#### Input

The first line contains three integers **n**, **s** and **v** (**2** ≤ **n** ≤ **1000**, **1** ≤ **v** ≤ `10`

, ^{5}**s** ≤ **n** * **v**) - number of stoves, number of stones and stove capacity, respectively.

The second line contains **n** - **1** integers `k`

- the volume of the _{i}**i**-th compartment (**1** ≤ `k`

≤ _{i}`10`

).^{5}

#### Output

Print the minimum possible total heat received by all compartments.

#### Explanation

In the example the correct answer is achieved if we put four stones into the first and the fourth stove, and two stones into the second. Then the heat in all compartments, except the first, will be zero, and in the first - eight.

4 10 4 1 2 3

8