based on the number of invoices and their denominations, get a sub-set of invoices that have a maximum sum less than the target number.