Solving problem 16. Test 2.