Problem 14 Solution