MetroCard

Given how much money you have in your card and how much you are willing to spend, calculate the optimal recharge amounts to pay only for what you use.