A program calculating the best choices when purchasing upgrades