URI Online Judge | 1542

Reading Books

By Normandes Jr, UFU BR Brazil

Timelimit: 3

You've started competing against your friend to see who can read more books in less time. Your friend used to read much more fast than you, until the day you realized that he'd read only small books.

So, you've decided counting how many pages each book has. And decided to increase the amount of pages read per day. Now you read 5 pages per day and finish 16 days before, if you were reading 3 pages per day. In this case, how many pages has the book?


The input has many test cases. Each test has tree numbers Q (0 < Q < 20), D (0 < D < 20) and P (0 < P < 20) separated by one blank space. Q means the amount of pages read per day. D is the number of days you could speed up, if you were reading the amount of pages P. An unique 0 (zero) value means end of inputs.


For each test case it should be printed how many pages the book has. Use plural appropriately in Portuguese ("pagina" or "paginas"). This number should be an integer and truncated - no rounding.

Sample Input Sample Output

3 16 5

120 paginas