Adding problem 14 solution.