You have D dollars with you. You want to put it into a Bank, namely Picu Bank. This bank has a peculiar behavior for interest. Regardless of the Bank deposit amount, every month it adds A dollars to your bank account and this continues till M months. Exaxtly on M+1 months, it adds B dollars (B<A) to your bank account. This scanario repeats again in same manner.( i.e on the (M+2)th month A dollars are added, and so on.. ). Your task is to find out how many months does it take for the dollar amount to reach at least X, in the bank account .
Input:
Input starts with an integer T(1≤T≤100000), denoting the number of test cases. Each case starts with 5 integers D,A,M,B , and X as described in problem statement.
Constraints:
Output:
For each case of input minimum number of months needed to reach dollar value of at least X in a single line.
Note that the Expected Output feature of Custom Invocation is not supported for this contest.