Solve problem 4.
Add problem 5 solution.