knapsack with repetitions added