Help me in solving LBCP08A problem

My issue

I did not understand the output can someone explain pls??

My code

// Step 1: Read and understand the problem statement and sample test cases

// Click on Next once you are ready to proceed.



Learning course: Beginner DSA in C
Problem Link: CodeChef: Practical coding for everyone

@rajan18
The logic is
if n<=m then the answer would be n.
else answer would be m+(n-m)*2.