Add solution to the 14th problem