Help me in solving LB08B problem

My issue

I don’t get this logic please explain

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

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

okkkk thanks man