Problem 13

Python 2.7