Addition of the solution to problem 2.