the solution of the problem 5