Problem 17 sovled