Solving the Knapsack problem in $O(n^2P)$, where P is the maximum weight of all items

Assume for the regular knapsack problem we have additional information – maximal weight of every item – lets denote it as P. Using this information, I want to solve the problem using dynamic programming in $ O(n^2P)$ . Anyone have an idea how to solve it?