XB has decided to become a football fan and started watching Liga 1. To enjoy as many successes as possible, he created his own championship with teams and stages, knowing for each team how many points they get in each stage , denoted as .
However, XB is a result-oriented supporter, and although loyalty should mean more in football, he cannot conceive staying with the same team even during tough times, so he can change his favorite team at most times during a season (he understands loyalty somewhat, just not entirely).
Task
The goal is to enjoy as many points as possible from his favorite teams throughout the season, knowing that he can change his favorite team at most times. If in a stage he supports team , the score he enjoys will increase by . Determine this maximum score.
Input Data
On the first line, there are three natural numbers, , , and , representing the number of teams, the number of stages, and the maximum number of favorite team changes.
On the next lines, there are natural numbers, representing the score obtained by team in stage .
Output Data
On the first line, there will be a single number, the maximum score XB can achieve if he supports the right teams.
Constraints and Clarifications
# | Points | Constraints |
---|---|---|
0 | 0 | Example |
1 | 9 | |
2 | 14 | |
3 | 44 | |
4 | 33 | No further constraints |
Example
stdin
4 5 1
3 2 4 5 1
1 1 5 5 5
2 4 1 2 3
4 5 2 1 3
stdout
24
Explanation
XB can first support team for two rounds, and then he will support team , thus obtaining points.