Ex. 5.1. Added solution.