Added solution for problem 17.