Solved problem 004.