knapsack with repition