Solved problem 3.