Problem 56 (inefficient)