Implemented Problem 45