410088: GYM103940 E Express Warehouse Migration

Memory Limit:1024 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Express Warehouse Migrationtime limit per test1 secondmemory limit per test1024 megabytesinputstandard inputoutputstandard output

Jaime's distribution company is getting back to business. In this new distribution task Jaime has to move $$$N$$$ boxes that are stored in his backup warehouse to the main warehouse. In order to do this, Jaime has only one truck, so he will drive to the backup warehouse, then load the truck, and finally drive to the main warehouse and unload the truck, all the previous process is considered a single trip of boxes. Jaime knows if he loads more than $$$M$$$ boxes in the truck it will force the engine and potentially break it, so he will ensure to move the boxes without forcing the engine.

Can you help Jaime determine, how many trips does he has to make in order to move all the boxes from the backup warehouse to the main warehouse?

Input

The first and only line of input contains two integers separated by a space, $$$N$$$ and $$$M$$$ ($$$1 \leq N,M \leq 10^6$$$)

Output

Print a single line with an integer number, the minimum number of trips Jaime has to make to move all the boxes to the warehouse.

ExamplesInput
10 10
Output
1
Input
1 10
Output
1
Input
11 5
Output
3

加入题单

上一题 下一题 算法标签: