Solving problem 7. Test 2.