Alice and her younger brother Bob are playing a game called, "Slay the Dragon". This game involves killing \(N\) dragons, \(i^{th}\) dragon has \(H_{i}\) health points, initially positive for all \(i\). A dragon is considered dead if \(H_{i} \leq 0\) and the person who lands the killing shot to the \(i^{th}\) dragon earns \(C_{i}\) currency. Shooting the \(i^{th}\) dragon with force \(F\) reduces \(H_{i}\) by \(F\). The two players take turns alternately, starting with Alice. A person can also choose to forgo any turn (effectively shooting an arbitrary dragon with zero force). The aim of the game is to maximize currency and the game ends when all dragons are dead.
Bob, being an inexperienced, little boy, hits the first undead dragon (least \(i\) such that \(H_{i} > 0\)) with force \(F_{Bob}\) on every single turn he gets. Alice realizes that this is not the optimal strategy for winning. She hits an optimally chosen dragon (any \(i\) such that \(H_{i} > 0\)) with force \(F_{Alice}\), during her turns. Also, she chooses to forgo some of her turns strategically unlike her brother.
How much currency can Bob earn if Alice plays optimally?
Input Format
First-line contains \(N, F_{Bob}, F_{Alice}\).
Second-line contains \(N\) integers denoting \(H\).
Third-line contains \(N\) integers denoting \(C\).
Output Format
Print the amount of currency Bob earns.
Constraints
\(1 \leq N \leq 1000 \\ 10 \leq F_{Bob}, F_{Alice}, H_{i} \leq 100 \\ 1 \leq C_{i} \leq 10^{5}\)