Modified Problem 40