iterate an operation disguising an easy knapsack