maximum-profit-problem