Олимпиадный тренинг

Задача 33092. Very easy task - 2


This morning the jury decided to add one more Very Easy Problem to the Olympiad version. The executive secretary of the Organizing Committee printed its condition in one copy, and now he needs to make N more copies before the start of the Olympiad. He has M photocopiers at his disposal, each of which copies a sheet in х seconds. (You can use all copiers at the same time. You can copy not only from the original, but also from a copy.) Help him figure out what the minimum time is for this.

The program should run faster than linear search

Input data format
The first line contains yes natural numbers N, M  separated by a space (1 ≤ N, M ≤ 2< span style="color: rgb(0, 0, 0); font-family: verdana; font-size: 14px;">•108), the second line contains speed of all copiers - x (1 ≤ x ≤ 10 )

Output data format
Print one number – the minimum time in seconds required to obtain N copies.

Enter Output
8 3
2 3 7
9