problem 003 solution