The famous artist Karuna is playing the rhythm gane.
The artist is trying to hit the notes in a song. The song is a sequence of $$$N$$$ notes.
The scoring system used in this game is as follows:
Karuna's skills allow him to hit no more than $$$K$$$ notes during the song. For every note, he may choose to hit it or to miss it, as long as he hits no more than $$$K$$$ notes in total.
Given all the parameters, tell the maximum score Karuna can get.
The first line of the input contains three integers $$$N$$$, $$$K$$$ and $$$P$$$ ($$$1 \le N, K \le 2000$$$, $$$-10^9 \le P \le 10^9$$$): the number of notes in the song, the maximum number of notes Karuna can hit and combo break score, respectively.
The second line contains $$$N$$$ integers separated by spaces. The $$$i$$$-th number represents the score $$$A_i$$$ for hitting the $$$i$$$-th note ($$$0 \le A_i \le 10^5$$$).
The third line contains $$$N$$$ integers separated by spaces. The $$$j$$$-th number represents the score $$$C_j$$$ for a combo of length $$$j$$$ ($$$-10^5 \le C_j \le 10^5$$$, and for all $$$1 \le j \le N-1$$$, it is guaranteed that $$$C_j \ge C_{j+1}$$$).
Print one integer: the maximum score Karuna can get in the Rhythm Game.
5 5 1 5 4 3 2 1 5 4 3 2 1
57
| Название |
|---|


