DP problem 1.