ENG  RUSTimus Online Judge
Online Judge
Online contests
About Online Judge
Frequently asked questions
Site news
Problem set
Submit solution
Judge status
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests

USU Championship 2001

About     Problems     Submit solution     Judge status     Standings
Contest is over

H. Copying

Time limit: 0.25 second
Memory limit: 64 MB
A new educating program was received by the kindergarten. Of course, children have discovered it immediately and want to play with it as soon as possible. In order to let them do it the program has to be copied to all the N computers that the kindergarten had bought just before the default of 1998. At the moment the program is installed only on one computer. Other computers do not have floppy drives and are not connected with a local network. The only way to transfer information from one computer to another is to copy it using a null-modem cable (a cable that connects two computers directly). So, if the program is installed on a computer, it can be copied to some other (but only one!) computer within an hour. There are only K null-modem cables in the kindergarten. Your task is to estimate the minimal time necessary for copying the program to all the computers in the kindergarten.


The only input line contains two integers separated with a space: N and K (1 ≤ N ≤ 109; 1 ≤ K ≤ 109).


You are to output the minimal time (in hours) necessary for copying of the program to all the computers.


8 3
Problem Author: Stanislav Vasilyev, Alexander Mironenko
Problem Source: VI Ural State University Collegiate Programming Contest (21.10.2001)
To submit the solution for this problem go to the Problem set: 1131. Copying