How to Deliver Maximum Value Using R & Python