Added (inefficient) solution to problem 14.