add the answer of problem 3