Under construction

Still being built. Things may change

Grasshopper

Interview

Time limit1sMemory limit128 MB

Summary
The grasshopper crosses width x with the fewest jumps, starting at length s and halving each later jump rounded down, with 1 always allowed.
Level

Easy3 of 10

Topics
Greedy, Simulation, Math
Solved
No attempts yet

Problem

A grasshopper wants to get across to the other side of a road. Its first jump can have length ss, but because it grows tired, every jump after that can be at most half the length of the previous one (the jump length is rounded down to an integer). The grasshopper can, however, always make a jump of length 11 without tiring.

Given the width of the road, find the minimum number of jumps the grasshopper must make to reach the other side.

Input

The first and only line of standard input contains two integers xx and ss (1≤x,s≤1091 \le x, s \le 10^9), denoting the width of the road and the grasshopper's first jump length, respectively.

Output

Print a single integer on the first line of standard output: the minimum number of jumps the grasshopper needs to reach the other side of the road.

Examples1

  1. Example 1

    Input
    6 4
    
    Expected output
    2