As the end of the $2017/18$ campaign approaches, football clubs across Europe will be assessing their squads and deciding which areas they need to improve when the summer transfer window opens. Clubs could sell and buy pla
yers as they want.
$Aguin$ is a fan of Real Madrid, and he pays close attention to the summer transfer window. Among the data he collected, Real Madrid only has $P$ dollars for the transfer window with the financial pressure. Real Madrid has $n$ players, each of them has the ability value $a_{i}$ and the transfer value $b_{i}$. (Real Madrid can obtain $b_{i}$ dollars by selling the $i^{th}$ player).
Also there are $m$ players of other clubs are in the sale, each of them has the ability value $c_{i}$ and the transfer value $d_{i}$. (Real Madrid will cost $b_{i}$ dollars by buying the $i^{th}$ player)
$Aguin$ is curious the maximum sum of players' ability value Real Madrid could has. But he's too stupid to calculate it. Can you tell him?
Pay attention, what $Aguin$ want is the maximum sum, even the number of Real Madrid's players is less than 11.