Problem 205 solution