problem 009 solution