DP on integers.