solve problem 17