Minimum Number Of Steps

medium
https://codeforces.com/problemset/problem/804/B

Input Format

Check the link

Output Format

Check the link

Constraints

Check the link

Notice

Check the link

Example

Input

        
Output

        
Previous
Easy Number Challenge
Next
Sea Battle

Related Questions