# Newbie

Limits 1s, 256 MB

Boba has opened a toy-manufacturing company that has $n$ workers, where exactly $m$ workers are newbies and the rest $(n-m)$ workers are experienced. Each toy can be made by exactly one worker, but all workers can work in parallel on different toys. However, if an experienced worker takes $t$ time to complete one toy of a specific design, a newbie takes $2t$ to make the same toy (simply, twice as much time).

Boba's very good friend Kiki wants $n$ toys, each with different designs. Boba has done his calculations and prepared a dataset on how much time an experienced worker will need to complete each toy. Formally, he has prepared an array $A$ where the $i$-th element $a_i$ denotes the amount of time an experienced worker will take to complete the $i$-th toy.

Now, Boba has asked for your help to calculate the minimum amount of time required to complete all $n$ toys, if he assigns the workers to each toy optimally, also ensuring that every worker will work on at least one toy.

## Input

The first line contains an integer $n$ $(1 \le n \le 1000)$ denoting the number of toys Kiki wants.

The second line contains $n$ space-separated integers denoting the array $A$, where the $i$-th element $a_i$ $(1 \le a_i \le 10^9)$ denotes the time an experienced worker will take to complete the $i$-th toy.

The third line contains an integer $m$ $(0 \le m \le n)$ denoting the number of workers who are newbies.

## Output

Print an integer in a single line denoting the minimum amount of time required to complete all toys in the given scenario.

## Samples

InputOutput
3
5 11 8
1

11


The only newbie worker should work on the first toy.

InputOutput
3
7 13 7
2

14


The two newbie workers should work on the first toy and the third toy respectively.

### Statistics

96% Solution Ratio
SyedshakilmahmEarliest, 6M ago
nafim1703Fastest, 0.0s
Imran.666626Lightest, 5.1 MB
asifm91Shortest, 160B