Problem 56

Python 2.7