Little G is going to playnnngames. Little G is the king of gamers. If he wants to win, he will definitely win a game. But if he doesn't care about winning or losing, he will lose a game because o
Little G is going to play nnn games. Little G is the king of gamers. If he wants to win, he will definitely win a game. But if he doesn't care about winning or losing, he will lose a game because of his bad luck. Little G has an expected winning rate of x=abx=frac{a}{b}x=ba. When playing the iii-th game, if his current winning rate is lower than or equal to xxx, he will be eager to win and win the game easily. Otherwise, he will enjoy the game and lose it. Given n,a,bn,a,bn,a,b, Little G is wondering how many games he will win. Note that when playing the first game, the winning rate is regarded as 000. It is guaranteed that the answer is either ⌊n∗x⌋lfloor n*x rfloor⌊n∗x⌋ or ⌊n∗x⌋+1lfloor n*x rfloor +1⌊n∗x⌋+1.