Implemented Problem 36