An example of the Knapsack problem solved dynamically