On Teacher's Day, Vasya decided to buy a bouquet of flowers. The store sells daisies for per piece and gladioluses for per piece, where a < b. Vasya has units of currency. He wants to compose a bouquet with the maximum possible number of flowers, and at the same time spend as much money as possible. In other words, among all bouquets with the largest possible number of flowers (costing no more than ), he wants to choose the most expensive one. Help him calculate the cost of such a bouquet.
Three integers , , (1 \leq a < b \leq 100, 0 \leq c \leq 1000).
Print a single number — the cost of the most expensive bouquet with the maximum number of flowers.
Example 1
Example 2