Hi codechef community, Please help me with this problem

you are given x=1 and you have to make it n (given in input ) using one of the following operations and using minimum cost

operation 1 x = x+1 with cost1(input)

operation 2 x = x -1 with cost2(input)

operation 3 x = x * 2 with cost 3(input)

e.g

suppose n=8 , cost1=1 ,cost2=10 , cost3=100

then to reach 8 you should follow operation1 7 times thereby to reach 8 in minimum number of times.