Adding solution to Problem 14.