Professor Oak kas a big lemon tree that produces nice lemons. However, every time that a friend visits him, he or she always asks for “a few” of them. As a result, Prof. Oak can barely enjoy his own lemons.
Tired of this situation, Prof. Oak has decided to impose a rule: When someone asks for lemons, he or she can only take a Fibonacci number of them. (Remember the definition: , , for .) This way, perhaps some lemons can be saved...
The lemon tree has currently lemons, and a group of mathematicians visits Prof. Oak. They will collaborate to take the maximum total number of lemons. (They will share all them later.) For instance, if and , then each mathematician can ask for lemons, only leaving 4 lemons to Prof. Oak. It is easy to see that there is no combination for 2 mathematicians with a sum larger than 42 but not larger than 46.
Given and , how many lemons will Prof. Oak enjoy?
Input consists of several cases, each with and . Assume and .
For every case, print the number of lemons left by the mathematicians.
Input
46 2 4 1000 679891637638612257 1
Output
4 0 259695496911122584