I am not able to understand this problem

please explain this problem

@Vipin_coder,

Let total steps is n, find the nearest integer which is of power 2 and less then n. let it would be k. now remaining steps to cover is n-k and result = 1 + min steps for (n-k) remaining steps.

Or:
if you represent the number in binary form then you can observe the ans is just the no of set bits in that number .