Problem 5 Solution.