Problem 18, begin