Solve problem 6, Allen