Implemented Problem 56